Skip to content

Commit

Permalink
[backend] make targetdata binary safe
Browse files Browse the repository at this point in the history
  • Loading branch information
mlschroe committed Dec 15, 2017
1 parent bb607ec commit 09881a4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/backend/BSXML.pm
Expand Up @@ -1883,7 +1883,6 @@ our $clouduploadjob = [
'size',

'pid', # internal
'targetdata', # internal
];

1;
3 changes: 2 additions & 1 deletion src/backend/bs_clouduploadserver
Expand Up @@ -120,8 +120,9 @@ sub cloudupload_create {
die("$_ is missing from job skeleton\n") unless defined $jobskel->{$_};
$job->{$_} = $jobskel->{$_};
}
my $targetdata = delete $jobskel->{'targetdata'};
my $targetdata = delete $jobskel->{'details'};
$targetdata = '' unless defined $targetdata;
$targetdata = pack('H*', $targetdata);
my $jobid = nextjobid();
$job->{'name'} = $jobid;
$job->{'state'} = 'created';
Expand Down
2 changes: 1 addition & 1 deletion src/backend/bs_srcserver
Expand Up @@ -6129,7 +6129,7 @@ sub cloudupload_create {
'filename' => $filename,
'user' => $cgi->{'user'},
'target' => $cgi->{'target'},
'targetdata' => $targetdata,
'details' => unpack('H*', $targetdata),
};
my $param = {
'uri' => "$reposerver/build/$projid/$repoid/$arch/$packid/$filename",
Expand Down

0 comments on commit 09881a4

Please sign in to comment.