mirror of
https://github.com/m8tin/cis.git
synced 2026-08-01 11:47:31 +02:00
Used REGEX for composition sync
This commit is contained in:
+3
-3
@@ -23,9 +23,9 @@ function base.checkAllInputParameters() {
|
||||
_SUCCESS="true"
|
||||
for _ARG in "${@}"; do
|
||||
if [ -n "${_ARG}" ]; then
|
||||
# Has to start with an alphanumeric char '--' or '/'
|
||||
if [[ ! "${_ARG}" =~ ^(--|/)?[[:alnum:]] ]]; then
|
||||
echo "❌ Security base.checkAllInputParameters(): No special characters except '--' or '/' are allowed at the beginning of a parameter: '${_ARG}'" >&2
|
||||
# Has to start with an alphanumeric char '--', '/' or '@'
|
||||
if [[ ! "${_ARG}" =~ ^(--|/|@)?[[:alnum:]] ]]; then
|
||||
echo "❌ Security base.checkAllInputParameters(): No special characters except '--', '/' or '@' are allowed at the beginning of a parameter: '${_ARG}'" >&2
|
||||
_SUCCESS="false"
|
||||
fi
|
||||
# No forbidden character is allowed to remain
|
||||
|
||||
Reference in New Issue
Block a user