Used REGEX for composition sync

This commit is contained in:
m8in
2026-06-19 22:38:54 +02:00
parent 478d298b16
commit ffebc8c66e
4 changed files with 13 additions and 12 deletions
+3 -3
View File
@@ -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