V8.00.000.2025.06.17
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 1m54s

Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
2025-10-11 22:14:22 +01:00
parent be0a6c7c6a
commit 353568eb69
60 changed files with 2267 additions and 1163 deletions

View File

@@ -22,6 +22,9 @@ remove_whitespace() {
declare var_out=$(printf "%s" "$1" | xargs)
printf '%s' "${var_out}"
}
### Prevents accidental 'unset -f'.
# shellcheck disable=SC2034
readonly -f remove_whitespace
#######################################
# Function to escape all shell metacharacters
@@ -33,6 +36,9 @@ sanitize_input() {
### %q quotes the string so that the shell re-reads it as the original literal
printf '%q' "${input}"
}
### Prevents accidental 'unset -f'.
# shellcheck disable=SC2034
readonly -f sanitize_input
#######################################
# Function to remove any character not in the allowed set
@@ -46,4 +52,7 @@ sanitize_string() {
declare allowed='a-zA-Z0-9._/=\[\]:"\-+ '
printf '%s' "${input}" | tr -cd "${allowed}"
}
### Prevents accidental 'unset -f'.
# shellcheck disable=SC2034
readonly -f sanitize_string
# vim: number et ts=2 sw=2 sts=2 ai tw=128 ft=sh