Skip to content

Commit

Permalink
Do not escape org name twice
Browse files Browse the repository at this point in the history
If the entry is escaped, we'd need to mark every use of it in the
templates as `| safe` which is more dubious than not escaping the
database entry in the first place.

Fixes #6357
  • Loading branch information
eaon committed Sep 19, 2022
1 parent 4623ec9 commit 553b89b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion securedrop/journalist_app/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def update_org_name() -> Union[str, werkzeug.Response]:
if form.validate_on_submit():
try:
value = request.form["organization_name"]
InstanceConfig.set_organization_name(escape(value, quote=True))
InstanceConfig.set_organization_name(value)
flash(gettext("Preferences saved."), "org-name-success")
except Exception:
flash(gettext("Failed to update organization name."), "org-name-error")
Expand Down

0 comments on commit 553b89b

Please sign in to comment.