Update advanced/Scripts/webpage.sh

Co-authored-by: DL6ER <DL6ER@users.noreply.github.com>
This commit is contained in:
Adam Warner 2020-05-06 08:40:54 +01:00 committed by GitHub
parent 26f71e4dbe
commit 369288cc48
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -521,7 +521,7 @@ Options:
# Sanitize email address in case of security issues
# Regex from https://stackoverflow.com/a/2138832/4065967
local regex
regex="^[a-z0-9!#\$%&'*+/=?^_\`{|}~-]+(\.[a-z0-9!#$%&'*+/=?^_\`{|}~-]+)*@([a-z0-9]([a-z0-9-]*[a-z0-9])?\.)+[a-z0-9]([a-z0-9-]*[a-z0-9])?\$"
regex="^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\$"
if [[ ! "${args[2]}" =~ ${regex} ]]; then
echo -e " ${CROSS} Invalid email address"
exit 0