Commit a5758fa2 authored by Frédéric Buclin's avatar Frédéric Buclin

Bug 1113630: Set window.opener to null for the URL field to prevent interaction…

Bug 1113630: Set window.opener to null for the URL field to prevent interaction between a remote script and the bug report r=gerv a=glob
parent e82a8134
......@@ -492,7 +492,7 @@
<span id="bz_url_edit_container" class="bz_default_hidden">
[% IF is_safe_url(bug.bug_file_loc) %]
<a href="[% bug.bug_file_loc FILTER html %]" target="_blank"
title="[% bug.bug_file_loc FILTER html %]">
rel="noreferrer" title="[% bug.bug_file_loc FILTER html %]">
[% bug.bug_file_loc FILTER truncate(40) FILTER html %]</a>
[% ELSE %]
[% bug.bug_file_loc FILTER html %]
......@@ -503,7 +503,8 @@
[% url_output = PROCESS input no_td=1 inputname => "bug_file_loc" size => "40" colspan => 2 %]
[% IF NOT bug.check_can_change_field("bug_file_loc", 0, 1)
AND is_safe_url(bug.bug_file_loc) %]
<a href="[% bug.bug_file_loc FILTER html %]">[% url_output FILTER none %]</a>
<a href="[% bug.bug_file_loc FILTER html %]"
rel="noreferrer">[% url_output FILTER none %]</a>
[% ELSE %]
[% url_output FILTER none %]
[% END %]
......
......@@ -148,7 +148,7 @@
<th>[% field_descs.bug_file_loc FILTER html %]:</th>
<td colspan="3">
[% IF is_safe_url(bug.bug_file_loc) %]
<a href="[% bug.bug_file_loc FILTER html %]">
<a href="[% bug.bug_file_loc FILTER html %]" rel="noreferrer">
[% bug.bug_file_loc FILTER html %]</a>
[% ELSE %]
[% bug.bug_file_loc FILTER html %]
......
......@@ -213,7 +213,7 @@
[%- bug.$column.truncate(256, '...') FILTER html -%]
[% ELSIF column == 'bug_file_loc' && is_safe_url(bug.bug_file_loc) %]
<a href="[% bug.bug_file_loc FILTER html %]" target="_blank"
title="[% bug.bug_file_loc FILTER html %]">
rel="noreferrer" title="[% bug.bug_file_loc FILTER html %]">
[%- display_value(column, bug.$column).truncate(col_abbrev.maxlength, col_abbrev.ellipsis) FILTER html -%]
</a>
[% ELSE %]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment