From 3ab12acc55af045f6818eec2a6a370dbd7c6f68fa0d4ded279bc521891059752 Mon Sep 17 00:00:00 2001 From: "Marc S. Weidner" Date: Sat, 31 May 2025 08:51:36 +0200 Subject: [PATCH] V8.02.644.2025.05.31 Signed-off-by: Marc S. Weidner --- lib/lib_sanitizer.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/lib_sanitizer.sh b/lib/lib_sanitizer.sh index e07a127..968843e 100644 --- a/lib/lib_sanitizer.sh +++ b/lib/lib_sanitizer.sh @@ -35,11 +35,10 @@ arg_check() { sanitize_arg() { declare input="$1" # Define allowed characters: - # letters, digits, dot, underscore, slash, equals, [, ], colon, double-quote, hyphen, plus, space. - declare allowed + # letters, digits, dot, underscore, slash, equals, [, ], colon, double-quote, hyphen, space. + declare allowed='a-zA-Z0-9._/=\[\]:"\-+ ' declare disallowed - allowed='a-zA-Z0-9._/=[]:"-+ ' - disallowed=$(printf '%s' "$input" | sed "s/[$allowed]//g") + disallowed=$(printf '%s' "${input}" | tr -d "${allowed}") if [[ -n ${disallowed} ]]; then {