diff options
| author | Nicolas Vigier <boklm@torproject.org> | 2019-05-16 12:38:08 +0200 |
|---|---|---|
| committer | Nicolas Vigier <boklm@torproject.org> | 2019-05-16 12:38:08 +0200 |
| commit | 6e60b0bd52a8e85c6f85eb531737258be914fc2d (patch) | |
| tree | 3bd8ab88ef2ace9f17c2b5fc0c48379380b5ec13 | |
| parent | 87adfb7b7be7e7e0f437020dbf8a119673133412 (diff) | |
Bug 30480: Check that a signed tag object contains the expected tag namebug_30480
| -rw-r--r-- | lib/RBM.pm | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -308,6 +308,14 @@ sub git_commit_sign_id { return gpg_get_fingerprint(@l); } +sub git_get_signed_tagname { + foreach my $l (split(/\n/, $_[0])) { + return '' unless $l; + return $1 if $l =~ m/^tag (.*)$/; + } + return ''; +} + sub git_tag_sign_id { my ($project, $tag) = @_; my $w = set_git_gpg_wrapper($project); @@ -315,6 +323,7 @@ sub git_tag_sign_id { = capture_exec('git', 'tag', '-v', $tag); unset_git_gpg_wrapper($w); return undef unless $success; + return undef unless git_get_signed_tagname($stdout) eq $tag; return gpg_get_fingerprint(split /\n/, $stderr); } |
