[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[lintian] 01/01: Ignore the magic http://sf.net/ redirector URI for the debian-watch-uses-insecure-uri tag. (Closes: #879206)



This is an automated email from the git hooks/post-receive script.

lamby pushed a commit to branch master
in repository lintian.

commit 540ad0bfe479b1a643fbe597ee9e5da045b21d56
Author: Chris Lamb <lamby@debian.org>
Date:   Fri Oct 20 09:41:14 2017 -0400

    Ignore the magic http://sf.net/ redirector URI for the debian-watch-uses-insecure-uri tag. (Closes: #879206)
---
 checks/watch-file.pm                           | 2 +-
 debian/changelog                               | 2 ++
 t/tests/watch-file-general/debian/debian/watch | 3 +++
 t/tests/watch-file-general/tags                | 1 +
 4 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/checks/watch-file.pm b/checks/watch-file.pm
index abe3d14..3f07ea7 100644
--- a/checks/watch-file.pm
+++ b/checks/watch-file.pm
@@ -137,7 +137,7 @@ sub run {
                               /projects/.+/files}xsm
               ) {
                 tag 'debian-watch-file-should-use-sf-redirector', "line $.";
-            } elsif (m%((?:http|ftp):\S+)%) {
+            } elsif (m%((?:http|ftp):(?!//sf.net/)\S+)%) {
                 tag 'debian-watch-uses-insecure-uri',$1;
             }
 
diff --git a/debian/changelog b/debian/changelog
index d478049..f2d9aa2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -35,6 +35,8 @@ lintian (2.5.56) UNRELEASED; urgency=medium
   * checks/watch-file.pm:
     + [CL] Include the offending URI in debian-watch-uses-insecure-uri
       output, not the line number.
+    + [CL] Ignore the magic http://sf.net/ redirector URI for the
+      debian-watch-uses-insecure-uri tag.  (Closes: #879206)
 
   * data/fields/essential:
     + [CL] Apply patch from Helmut Grohne <helmut@subdivi.de> to treat
diff --git a/t/tests/watch-file-general/debian/debian/watch b/t/tests/watch-file-general/debian/debian/watch
index 956fef9..dc196dd 100644
--- a/t/tests/watch-file-general/debian/debian/watch
+++ b/t/tests/watch-file-general/debian/debian/watch
@@ -27,3 +27,6 @@ http://githubredir.debian.net/github/username/project /(.*).tar.gz
 
 http://insecure.com /(.*).tar.gz
 https://secure.com /(.*).tar.gz
+
+# False positive for debian-watch-uses-insecure-uri
+http://sf.net/uses/redirector-([^-]+)\.tar\.gz
diff --git a/t/tests/watch-file-general/tags b/t/tests/watch-file-general/tags
index c00c26a..ab0ffa6 100644
--- a/t/tests/watch-file-general/tags
+++ b/t/tests/watch-file-general/tags
@@ -10,6 +10,7 @@ W: watch-file-general source: debian-watch-file-should-mangle-version line 15
 W: watch-file-general source: debian-watch-file-should-mangle-version line 24
 W: watch-file-general source: debian-watch-file-should-mangle-version line 28
 W: watch-file-general source: debian-watch-file-should-mangle-version line 29
+W: watch-file-general source: debian-watch-file-should-mangle-version line 32
 W: watch-file-general source: debian-watch-file-should-use-sf-redirector line 12
 W: watch-file-general source: debian-watch-file-should-use-sf-redirector line 14
 W: watch-file-general source: debian-watch-file-should-use-sf-redirector line 15

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git


Reply to: