mirror of https://github.com/CISOfy/lynis.git
Allow forward slash in SafeInput check
This commit is contained in:
parent
f08cde63d6
commit
f2ac59a130
|
@ -3052,12 +3052,12 @@
|
|||
|
||||
SafeInput() {
|
||||
exitcode=1
|
||||
# By default remove only special or undefined characters
|
||||
# Test against the string with a generic test set
|
||||
if [ $# -eq 1 ]; then
|
||||
input="$1"
|
||||
# Allow only a common set of characters in first parameter
|
||||
cleaned=$(echo "$input" | sed 's/[^a-zA-Z0-9\._:=-]//g')
|
||||
# If know what to test against, then see if input matches the specified class
|
||||
# Only allow common set of characters: a-z, A-Z, 0-9, /._-:=
|
||||
cleaned=$(echo "$input" | sed 's/[^a-zA-Z0-9\/\._:=-]//g')
|
||||
# If two parameters are specified, then test input against specified class
|
||||
elif [ $# -eq 2 ]; then
|
||||
input="$1"
|
||||
testchars="$2"
|
||||
|
|
Loading…
Reference in New Issue