diff options
author | Reed Loden <reed@reedloden.com> | 2015-01-06 23:10:09 +0100 |
---|---|---|
committer | Reed Loden <reed@reedloden.com> | 2015-01-06 23:10:46 +0100 |
commit | ce356db60ac26cefd208f6a7474c337c00237f27 (patch) | |
tree | 764aac31e92b6277021c91769067186d696da520 | |
parent | 7bbb2425c7d3da7dc58e1bde64aed3e61fe79b5b (diff) | |
download | bugzilla-ce356db60ac26cefd208f6a7474c337c00237f27.tar.gz bugzilla-ce356db60ac26cefd208f6a7474c337c00237f27.tar.xz |
Bug 1118401 - Use https:// for linkification of CVEs and VCS-related output
r=dkl
-rw-r--r-- | extensions/BMO/Extension.pm | 8 | ||||
-rw-r--r-- | extensions/BMO/t/bug_format_comment.t | 18 |
2 files changed, 16 insertions, 10 deletions
diff --git a/extensions/BMO/Extension.pm b/extensions/BMO/Extension.pm index 66d909b45..604de68cb 100644 --- a/extensions/BMO/Extension.pm +++ b/extensions/BMO/Extension.pm @@ -559,7 +559,7 @@ sub bug_format_comment { replace => sub { my $args = shift; my $match = html_quote($args->{matches}->[0]); - return qq{<a href="http://cve.mitre.org/cgi-bin/cvename.cgi?name=$match">$match</a>}; + return qq{<a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=$match">$match</a>}; } }); @@ -569,7 +569,7 @@ sub bug_format_comment { replace => sub { my $args = shift; my $match = html_quote($args->{matches}->[0]); - return qq{<a href="http://viewvc.svn.mozilla.org/vc?view=rev&revision=$match">r$match</a>}; + return qq{<a href="https://viewvc.svn.mozilla.org/vc?view=rev&revision=$match">r$match</a>}; } }); @@ -586,7 +586,7 @@ sub bug_format_comment { my $id = html_quote($args->{matches}->[3]); $url =~ s/\s+$//; $url =~ s/\/$//; - return qq{$preamble<a href="http://$url/revision/$id">$text</a>}; + return qq{$preamble<a href="https://$url/revision/$id">$text</a>}; } }); @@ -600,7 +600,7 @@ sub bug_format_comment { my $repo = html_quote($args->{matches}->[1]); my $text = $args->{matches}->[2]; my $revision = $args->{matches}->[3]; - return qq#$preamble<a href="http://git.mozilla.org/?p=$repo;a=commitdiff;h=$revision">$text</a>#; + return qq#$preamble<a href="https://git.mozilla.org/?p=$repo;a=commitdiff;h=$revision">$text</a>#; } }); diff --git a/extensions/BMO/t/bug_format_comment.t b/extensions/BMO/t/bug_format_comment.t index 0356684e9..532b8fb8d 100644 --- a/extensions/BMO/t/bug_format_comment.t +++ b/extensions/BMO/t/bug_format_comment.t @@ -26,6 +26,9 @@ bp-deadbeef-deaf-beef-beed-cafefeed1337 # CVE/CAN security things CVE-2014-0160 +CVE-2014-0001 +CVE-2014-13579 +CVE-2014-999999999 # svn r2424 @@ -68,12 +71,15 @@ foreach my $re (@regexes) { my @links = ( '<a href="https://crash-stats.mozilla.com/report/index/deadbeef-deaf-beef-beed-cafefeed1337">bp-deadbeef-deaf-beef-beed-cafefeed1337</a>', - '<a href="http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-0160">CVE-2014-0160</a>', - '<a href="http://viewvc.svn.mozilla.org/vc?view=rev&revision=2424">r2424</a>', - '<a href="http://git.mozilla.org/?p=bugzilla/bugzilla.git;a=commit;h=eab44b1">36f56bd..eab44b1 withuri -> withuri</a>', - '<a href="http://git.mozilla.org/?p=bugzilla/bugzilla.git;a=commit;h=eab44b1">36f56bd..eab44b1 nouri -> nouri</a>', - '<a href="http://git.mozilla.org/?p=bugzilla/bugzilla.git;a=commit;h=eab44b1">36f56bd..eab44b1 nologin -> nologin</a>', - 'http://bzr.mozilla.org/bmo/4.2/revision/9257', + '<a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-0160">CVE-2014-0160</a>', + '<a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-0001">CVE-2014-0001</a>', + '<a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-13579">CVE-2014-13579</a>', + '<a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-999999999">CVE-2014-999999999</a>', + '<a href="https://viewvc.svn.mozilla.org/vc?view=rev&revision=2424">r2424</a>', + '<a href="https://git.mozilla.org/?p=bugzilla/bugzilla.git;a=commitdiff;h=eab44b1">36f56bd..eab44b1 withuri -> withuri</a>', + '<a href="https://git.mozilla.org/?p=bugzilla/bugzilla.git;a=commitdiff;h=eab44b1">36f56bd..eab44b1 nouri -> nouri</a>', + '<a href="https://git.mozilla.org/?p=bugzilla/bugzilla.git;a=commitdiff;h=eab44b1">36f56bd..eab44b1 nologin -> nologin</a>', + 'https://bzr.mozilla.org/bmo/4.2/revision/9257', ); foreach my $link (@links) { |