Fix CVE-2018-12356 by hardening the regex.

This commit is contained in:
Loganaden Velvindron 2018-06-15 21:45:32 +04:00
parent be27048a18
commit 9e2e5626da

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