mirror of
https://github.com/m8tin/cis.git
synced 2026-11-02 14:17:24 +01:00
Used REGEX for composition sync
This commit is contained in:
4 files changed
+13
-12
No files matched your search
+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