V9.14.022.2026.06.11: enforce secret and cleanup safeguards

This commit is contained in:
2026-06-11 05:08:01 +02:00
parent 74897d85b1
commit 9d3f283297
10 changed files with 182 additions and 154 deletions
+9 -4
View File
@@ -49,8 +49,6 @@ trap_on_exit() {
print_scr_exit "${errcode}"
exit "${errcode}"
else
if [[ "${ERRTRAP}" != "true" ]]; then
@@ -63,9 +61,16 @@ trap_on_exit() {
fi
exit "${errcode}"
fi
if ! sanitize_debug_logs; then
printf "\e[93m⚠ Final debug-log sanitisation failed; preserving original exit status %s. \e[0m\n" "${errcode}" >&2
if [[ -n "${LOG_ERROR:-}" && -f "${LOG_ERROR}" && ! -L "${LOG_ERROR}" ]]; then
printf "⚠ Final debug-log sanitisation failed; original exit status: %s.\n" "${errcode}" >> "${LOG_ERROR}" || true
fi
fi
exit "${errcode}"
}
### Prevents accidental 'unset -f'.
# shellcheck disable=SC2034