update-ngxblocker: fix email regex

* fixes regex for both busybox & GNU grep

closes https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker/issues/87
This commit is contained in:
Stuart Cardall 2017-09-02 15:39:03 +00:00
parent 73cff556b7
commit ebe4020c7a
No known key found for this signature in database
GPG key ID: AEB857F1C891D0C6

View file

@ -174,7 +174,7 @@ check_args() {
exit 1
fi
;;
email) if ! echo $arg | grep -E ^[\.-_[:alnum:]]+@[\.-_[:alnum:]]+[\.][\.a-z]+ 1>/dev/null; then
email) if ! echo $arg | grep -E ^[-_\.[:alnum:]]+@[-_\.[:alnum:]]+ 1>/dev/null; then
printf "$msg email@domain.com\n"
exit 1
fi