V8.00.000.2025.06.17
Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
@@ -47,18 +47,20 @@ sanitize_arg() {
|
||||
disallowed_ctrl=$(printf '%s' "${input}" | sed -n 's/[^[:cntrl:]]//gp' | sed $'s/./&\\n/g' \
|
||||
| while read -r c; do printf "%02X " "'${c}"; done)
|
||||
{
|
||||
printf "❌ Control character : '%s'. %s" "${disallowed_ctrl}" "${NL}"
|
||||
printf "❌ in argument : '%s'. %s" "${input}" "${NL}"
|
||||
printf "❌ Allowed Characters : 'a-z A-Z 0-9 . _ / = [ ] : \" - + space' %s" "${NL}"
|
||||
printf "%s" "${NL}"
|
||||
printf "❌ Control character : '%s'. %b" "${disallowed_ctrl}" "${NL}"
|
||||
printf "❌ in argument : '%s'. %b" "${input}" "${NL}"
|
||||
printf "❌ Allowed Characters : 'a-z A-Z 0-9 . _ / = [ ] : \" - + space' %b" "${NL}"
|
||||
printf "%b" "${NL}"
|
||||
} >> "${LOG_ERR}"
|
||||
|
||||
case "${VAR_IN_DIALOG_WR}" in
|
||||
box ) dialog_box_cleaner ;;
|
||||
gauge ) dialog_gauge_cleaner ;;
|
||||
esac
|
||||
printf "%s❌ Control character : '%s'. %s%s" "${RED}" "${disallowed_ctrl}" "${RES}" "${NL}" >&2
|
||||
printf "%s❌ in argument : '%s'. %s%s" "${RED}" "${input}" "${RES}" "${NL}" >&2
|
||||
printf "%s❌ Allowed Characters : 'a-z A-Z 0-9 . _ / = [ ] : \" - + space' %s%s" "${RED}" "${RES}" "${NL}" >&2
|
||||
|
||||
printf "%b❌ Control character : '%s'. %b%b" "${RED}" "${disallowed_ctrl}" "${RES}" "${NL}" >&2
|
||||
printf "%b❌ in argument : '%s'. %b%b" "${RED}" "${input}" "${RES}" "${NL}" >&2
|
||||
printf "%b❌ Allowed Characters : 'a-z A-Z 0-9 . _ / = [ ] : \" - + space' %b%b" "${RED}" "${RES}" "${NL}" >&2
|
||||
# shellcheck disable=SC2162
|
||||
read -p $'\e[92m✅ Press \'ENTER\' to exit the script ... \e[0m'
|
||||
exit "${ERR_UNSAFE_CHARACTER}"
|
||||
@@ -71,18 +73,18 @@ sanitize_arg() {
|
||||
disallowed=$(printf '%s' "${input}" | tr -d "${allowed}")
|
||||
if [[ -n ${disallowed} ]]; then
|
||||
{
|
||||
printf "❌ Invalid character : '%s'. %s" "${disallowed//?/& }" "${NL}"
|
||||
printf "❌ in argument : '%s'. %s" "${input}" "${NL}"
|
||||
printf "❌ Allowed Characters : 'a-z A-Z 0-9 . _ / = [ ] : \" - + space' %s" "${NL}"
|
||||
printf "%s" "${NL}"
|
||||
printf "❌ Invalid character : '%s'. %b" "${disallowed//?/& }" "${NL}"
|
||||
printf "❌ in argument : '%s'. %b" "${input}" "${NL}"
|
||||
printf "❌ Allowed Characters : 'a-z A-Z 0-9 . _ / = [ ] : \" - + space' %b" "${NL}"
|
||||
printf "%b" "${NL}"
|
||||
} >> "${LOG_ERR}"
|
||||
case "${VAR_IN_DIALOG_WR}" in
|
||||
box ) dialog_box_cleaner ;;
|
||||
gauge ) dialog_gauge_cleaner ;;
|
||||
esac
|
||||
printf "%s❌ Invalid character : '%s'. %s%s" "${RED}" "${disallowed//?/& }" "${RES}" "${NL}" >&2
|
||||
printf "%s❌ in argument : '%s'. %s%s" "${RED}" "${input}" "${RES}" "${NL}" >&2
|
||||
printf "%s❌ Allowed Characters : 'a-z A-Z 0-9 . _ / = [ ] : \" - + space' %s%s" "${RED}" "${RES}" "${NL}" >&2
|
||||
printf "%s❌ Invalid character : '%s'. %b%b" "${RED}" "${disallowed//?/& }" "${RES}" "${NL}" >&2
|
||||
printf "%b❌ in argument : '%s'. %b%b" "${RED}" "${input}" "${RES}" "${NL}" >&2
|
||||
printf "%b❌ Allowed Characters : 'a-z A-Z 0-9 . _ / = [ ] : \" - + space' %b%b" "${RED}" "${RES}" "${NL}" >&2
|
||||
# shellcheck disable=SC2162
|
||||
read -p $'\e[92m✅ Press \'ENTER\' to exit the script ... \e[0m'
|
||||
exit "${ERR_UNSAFE_CHARACTER}"
|
||||
|
||||
Reference in New Issue
Block a user