From ce356db60ac26cefd208f6a7474c337c00237f27 Mon Sep 17 00:00:00 2001 From: Reed Loden Date: Tue, 6 Jan 2015 14:10:09 -0800 Subject: Bug 1118401 - Use https:// for linkification of CVEs and VCS-related output r=dkl --- extensions/BMO/Extension.pm | 8 ++++---- 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{$match}; + return qq{$match}; } }); @@ -569,7 +569,7 @@ sub bug_format_comment { replace => sub { my $args = shift; my $match = html_quote($args->{matches}->[0]); - return qq{r$match}; + return qq{r$match}; } }); @@ -586,7 +586,7 @@ sub bug_format_comment { my $id = html_quote($args->{matches}->[3]); $url =~ s/\s+$//; $url =~ s/\/$//; - return qq{$preamble$text}; + return qq{$preamble$text}; } }); @@ -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$text#; + return qq#$preamble$text#; } }); 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 = ( 'bp-deadbeef-deaf-beef-beed-cafefeed1337', - 'CVE-2014-0160', - 'r2424', - '36f56bd..eab44b1 withuri -> withuri', - '36f56bd..eab44b1 nouri -> nouri', - '36f56bd..eab44b1 nologin -> nologin', - 'http://bzr.mozilla.org/bmo/4.2/revision/9257', + 'CVE-2014-0160', + 'CVE-2014-0001', + 'CVE-2014-13579', + 'CVE-2014-999999999', + 'r2424', + '36f56bd..eab44b1 withuri -> withuri', + '36f56bd..eab44b1 nouri -> nouri', + '36f56bd..eab44b1 nologin -> nologin', + 'https://bzr.mozilla.org/bmo/4.2/revision/9257', ); foreach my $link (@links) { -- cgit v1.2.3-24-g4f1b