reject passwords with single or double quotes or backslashes

This commit is contained in:
m0duspwnens
2020-09-28 11:51:19 -04:00
parent 3ba8f47d9c
commit 85e53c53af
5 changed files with 28 additions and 1 deletions

View File

@@ -44,4 +44,10 @@ lookup_pillar_secret() {
check_container() {
docker ps | grep "$1:" > /dev/null 2>&1
return $?
}
check_password() {
local password=$1
echo "$password" | egrep -v "'|\"|\\\\" > /dev/null 2>&1
return $?
}