mirror of
https://github.com/CISOfy/lynis.git
synced 2025-09-23 09:58:14 +02:00
Allow spaces when using a parameter such as --auditor
This commit is contained in:
parent
4d55f7a0c9
commit
76a4f4dfd8
@ -3070,8 +3070,11 @@
|
||||
# Test against the string with a generic test set
|
||||
if [ $# -eq 1 ]; then
|
||||
input="$1"
|
||||
# Only allow common set of characters: a-z, A-Z, 0-9, /._-:=
|
||||
cleaned=$(echo "$input" | sed 's/[^a-zA-Z0-9\/\._:=-]//g')
|
||||
# Use sed to strip all characters -except- those that are allowed
|
||||
# - Common set of characters: a-z, A-Z, 0-9
|
||||
# - Special characters: , /._-:=
|
||||
# - Space for names (like auditor name)
|
||||
cleaned=$(echo "$input" | sed 's/[^[:space:]a-zA-Z0-9\/\._:=-]//g')
|
||||
# If two parameters are specified, then test input against specified class
|
||||
elif [ $# -eq 2 ]; then
|
||||
input="$1"
|
||||
|
Loading…
x
Reference in New Issue
Block a user