mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 15:03:34 +00:00
CVE-2020-9444: Prevent reverse tabnabbing attacks.
While we could fix this issue by changing the markdown processor, doing so is not a robust solution, because even a momentary bug in the markdown processor could allow cached messages that do not follow our security policy. This change ensures that even if our markdown processor has bugs that result in rendered content that does not properly follow our policy of using rel="noopener noreferrer" on links, we'll still do something reasonable. Co-authored-by: Tim Abbott <tabbott@zulipchat.com> Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
This commit is contained in:
committed by
Tim Abbott
parent
b21117954d
commit
c9796ba7f7
@@ -136,7 +136,7 @@ js_rules = RuleList(
|
||||
'exclude': {'frontend_tests/'},
|
||||
'description': '.includes() is incompatible with Internet Explorer. Use .indexOf() !== -1 instead.'},
|
||||
{'pattern': '[.]html[(]',
|
||||
'exclude_pattern': r'''[.]html[(]("|'|render_|html|message.content|sub.rendered_description|i18n.t|rendered_|$|[)]|error_text|widget_elem|[$]error|[$][(]"<p>"[)])''',
|
||||
'exclude_pattern': r'''\.html\(("|'|render_|html|message\.content|util\.clean_user_content_links|i18n\.t|rendered_|$|\)|error_text|widget_elem|\$error|\$\("<p>"\))''',
|
||||
'exclude': {'static/js/portico', 'static/js/lightbox.js', 'static/js/ui_report.js',
|
||||
'static/js/confirm_dialog.js',
|
||||
'frontend_tests/'},
|
||||
|
||||
Reference in New Issue
Block a user