From 5cce6efd30ef4bddc075b1f7a25026f5b8111ac4 Mon Sep 17 00:00:00 2001 From: m8in Date: Fri, 15 May 2026 18:08:54 +0200 Subject: [PATCH] Fix to allow absolute paths as parameter --- core/base.module.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/base.module.sh b/core/base.module.sh index 3667f3c..29adf87 100755 --- a/core/base.module.sh +++ b/core/base.module.sh @@ -20,9 +20,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:]] ]] && [[ ! "${_ARG}" =~ ^--[[:alnum:]] ]]; then - echo "❌ Security base.checkAllInputParameters(): No special character is allowed at the beginning of the 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