backoffice: don't leak parent formdata attributes in sidebar (#44398)

This commit is contained in:
Frédéric Péters 2020-06-24 11:10:29 +02:00
parent c670d9c5c2
commit cf34770395
1 changed files with 4 additions and 4 deletions

View File

@ -2642,15 +2642,15 @@ class FormBackOfficeStatusPage(FormStatusPage):
if extra_context.get('orig_formdef_id'):
r += htmltext('<h3>%s</h3>') % _('Original form')
try:
formdata = FormDef.get(extra_context.get('orig_formdef_id')
orig_formdata = FormDef.get(extra_context.get('orig_formdef_id')
).data_class().get(extra_context.get('orig_formdata_id'))
except KeyError:
r += htmltext('<p>%s</p>') % _('(deleted)')
else:
r += htmltext('<p><a href="%s">%s %s</a></p>') % (
formdata.get_url(backoffice=True),
formdata.formdef.name,
formdata.get_display_id())
orig_formdata.get_url(backoffice=True),
orig_formdata.formdef.name,
orig_formdata.get_display_id())
if formdata.submission_channel:
r += htmltext('<h3>%s</h3>') % '%s: %s' % (
_('Channel'), formdata.get_submission_channel_label())