From: Heiko Schlittermann (HS12-RIPE) Date: Wed, 28 Jun 2017 21:58:16 +0000 (+0200) Subject: Allow '+' in branch names X-Git-Url: https://git.exim.org/buildfarm-client.git/commitdiff_plain/cc554edeb2cd2d5690eab24af233e741d47692d0 Allow '+' in branch names We now uri_escape the branch name for transmmission. The server needs to do the same, otherwise the signature breaks. --- diff --git a/EximBuild/SCM.pm b/EximBuild/SCM.pm index becd24e..a722f3d 100644 --- a/EximBuild/SCM.pm +++ b/EximBuild/SCM.pm @@ -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 diff --git a/EximBuild/WebTxn.pm b/EximBuild/WebTxn.pm index f71f55a..455cd45 100644 --- a/EximBuild/WebTxn.pm +++ b/EximBuild/WebTxn.pm @@ -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);