Allow '+' in branch names
authorHeiko Schlittermann (HS12-RIPE) <hs@schlittermann.de>
Wed, 28 Jun 2017 21:58:16 +0000 (23:58 +0200)
committerHeiko Schlittermann <hs@schlittermann.de>
Wed, 28 Jun 2017 21:58:16 +0000 (23:58 +0200)
We now uri_escape the branch name for transmmission. The server
needs to do the same, otherwise the signature breaks.

EximBuild/SCM.pm
EximBuild/WebTxn.pm

index becd24e037ea73a6c7e3b65bf3434180763b3a07..a722f3d8e642ed926f6a7ecb4749bb87efdefd04 100644 (file)
@@ -213,7 +213,7 @@ sub checkout
         
         chdir $target;
         my @branches = `git branch 2>&1`;
-        unless (grep {/^\* bf_$branch$/} @branches)
+        unless (grep {/^\* bf_\Q$branch\E$/} @branches)
         {
             chdir '..';
             print "Missing checked out branch bf_$branch:\n",@branches
index f71f55a27074eef87bc64ec396e48b9dafd76dee..455cd45c818de7f76797914ed0d4e0d5a10db46d 100644 (file)
@@ -14,6 +14,7 @@ needed on older Msys installations (i.e. things running perl < 5.8).
 =cut 
 
 use strict;
+use URI::Escape;
 
 use vars qw($VERSION); $VERSION = 'REL_0.1';
 
@@ -99,7 +100,7 @@ sub run_web_txn
     my $content =
         "changed_files=$changed_this_run&"
       . "changed_since_success=$changed_since_success&"
-      ."branch=$branch&res=$status&stage=$stage&animal=$animal&ts=$ts"
+      . 'branch=' . uri_escape($branch) . "&res=$status&stage=$stage&animal=$animal&ts=$ts"
       ."&log=$log_data&conf=$confsum";
     my $sig= sha1_hex($content,$secret);