Fix CVE-2018-12356 by hardening the regex. (#503)

This commit is contained in:
jaykishan mutkawoa 2018-06-18 02:25:43 +04:00 committed by Adrian Gallagher
parent 4c20019d30
commit 2bce040c78
No known key found for this signature in database
GPG Key ID: FE3348877809386C

View File

@ -57,7 +57,7 @@ if ! $VALID; then
exit 1
fi
if $VALID && $REVSIG; then
printf '%s\n' "$INPUT" | gpg --trust-model always "$@" 2>/dev/null | grep "\[GNUPG:\] \(NEWSIG\|SIG_ID\|VALIDSIG\)"
printf '%s\n' "$INPUT" | gpg --trust-model always "$@" 2>/dev/null | grep "^\[GNUPG:\] \(NEWSIG\|SIG_ID\|VALIDSIG\)"
echo "$GOODREVSIG"
else
printf '%s\n' "$INPUT" | gpg --trust-model always "$@" 2>/dev/null