Update auth.sh

This commit is contained in:
kexkey
2018-10-17 15:59:07 -04:00
committed by GitHub
parent bfab6bf9a8
commit 06da9dc0dd

View File

@@ -42,11 +42,11 @@ verify_sign()
trace "[verify_sign] id=${id}" trace "[verify_sign] id=${id}"
# Check for code injection # Check for code injection
# id will usually be an int, but could be alphanum... nothing else # id will usually be an int, but can be alphanum... nothing else
if ! [[ $id =~ '^[A-Za-z0-9]$']]; then case $id in (*[![:alnum:]]*|"")
trace "[verify_sign] Potential code injection, exiting" trace "[verify_sign] Potential code injection, exiting"
return 1 return 1
fi esac
# It is so much faster to include the keys here instead of grep'ing the file for key. # It is so much faster to include the keys here instead of grep'ing the file for key.
. ./keys.properties . ./keys.properties
@@ -88,11 +88,11 @@ verify_group()
trace "[verify_group] action=${action}" trace "[verify_group] action=${action}"
# Check for code injection # Check for code injection
# action could be alphanum... nothing else # action can be alphanum... nothing else
if ! [[ $action =~ '^[A-Za-z]$']]; then case $action in (*[![:alnum:]]*|"")
trace "[verify_group] Potential code injection, exiting" trace "[verify_group] Potential code injection, exiting"
return 1 return 1
fi esac
# It is so much faster to include the keys here instead of grep'ing the file for key. # It is so much faster to include the keys here instead of grep'ing the file for key.
. ./api.properties . ./api.properties