File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change 11
11
if [ " $BITCOIN_VERIFY_COMMITS_ALLOW_SHA1 " = 1 ]; then
12
12
GPG_RES=" $( echo " $INPUT " | gpg --trust-model always " $@ " 2> /dev/null) "
13
13
else
14
+ # Note how we've disabled SHA1 with the --weak-digest option, disabling
15
+ # signatures - including selfsigs - that use SHA1. While you might think that
16
+ # collision attacks shouldn't be an issue as they'd be an attack on yourself,
17
+ # in fact because what's being signed is a commit object that's
18
+ # semi-deterministically generated by untrusted input (the pull-req) in theory
19
+ # an attacker could construct a pull-req that results in a commit object that
20
+ # they've created a collision for. Not the most likely attack, but preventing
21
+ # it is pretty easy so we do so as a "belt-and-suspenders" measure.
22
+
14
23
GPG_RES=" $( echo " $INPUT " | gpg --trust-model always --weak-digest sha1 " $@ " 2> /dev/null) "
15
24
fi
16
25
for LINE in $( echo " $GPG_RES " ) ; do
You can’t perform that action at this time.
0 commit comments