chiark / gitweb /
Properly quote package name when constructing regexp in complete_file_from_dsc. ...
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 16 Aug 2015 14:15:44 +0000 (15:15 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 16 Aug 2015 14:15:44 +0000 (15:15 +0100)
debian/changelog
dgit
infra/dgit-repos-server

index 1c5fbc4d8dec186f1de574925adb1cf4506ff313..f448cf03fbb6bc6ced6cde2f0c155461c6a0132b 100644 (file)
@@ -4,6 +4,10 @@ dgit (1.3) unstable; urgency=low
   * If a .orig in .. is a symlink, hardlink the link target into our
     private unpack directory, rather than the link itself (since latter
     won't work if the symlink is relative).
   * If a .orig in .. is a symlink, hardlink the link target into our
     private unpack directory, rather than the link itself (since latter
     won't work if the symlink is relative).
+  * Properly quote package name when constructing regexp in
+    complete_file_from_dsc.  Closes:#795736.  Also, grep the code for
+    likely similar problems elsewhere and improve a (harmless) instance in
+    dgit-repos-server.
 
  --
 
 
  --
 
diff --git a/dgit b/dgit
index 2d42f940f52c8f84c64f8ed6ac97c87786bcf60d..60b39e4ae66d7be7f9f4a07eb736daf36ce2336a 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -1481,7 +1481,7 @@ sub complete_file_from_dsc ($$) {
        my $furl = $dscurl;
        $furl =~ s{/[^/]+$}{};
        $furl .= "/$f";
        my $furl = $dscurl;
        $furl =~ s{/[^/]+$}{};
        $furl .= "/$f";
-       die "$f ?" unless $f =~ m/^${package}_/;
+       die "$f ?" unless $f =~ m/^\Q${package}\E_/;
        die "$f ?" if $f =~ m#/#;
        runcmd_ordryrun_local @curl,qw(-o),$tf,'--',"$furl";
        next if !act_local();
        die "$f ?" if $f =~ m#/#;
        runcmd_ordryrun_local @curl,qw(-o),$tf,'--',"$furl";
        next if !act_local();
index 9705a6420a628298c5c95857042ed3c74c94d941..cfa0f314fffc312b08aa9b47395215d1d7cc0671 100755 (executable)
@@ -624,7 +624,7 @@ sub dm_txt_check ($$) {
     printdebug " dm_txt_check $keyid $dmtxtfn\n";
     open DT, '<', $dmtxtfn or die "$dmtxtfn $!";
     while (<DT>) {
     printdebug " dm_txt_check $keyid $dmtxtfn\n";
     open DT, '<', $dmtxtfn or die "$dmtxtfn $!";
     while (<DT>) {
-       m/^fingerprint:\s+$keyid$/oi
+       m/^fingerprint:\s+\Q$keyid\E$/oi
            ..0 or next;
        if (s/^allow:/ /i..0) {
        } else {
            ..0 or next;
        if (s/^allow:/ /i..0) {
        } else {