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

Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
2025-07-29 19:46:22 +02:00
parent dd9c937a56
commit 219c272299
10 changed files with 88 additions and 92 deletions

View File

@@ -54,14 +54,14 @@ read_password_file() {
### No tracing for security reasons
[[ "${VAR_DEBUG_TRACE,,}" == "true" ]] && set +x
if [[ ! -f "${var_input_file}" ]]; then
do_log "fatal" "file_only" "Password file '${var_input_file}' not found."
do_log "fatal" "file_only" "0104() Password file '${var_input_file}' not found."
return "${ERR_READ_PASS_FILE}"
fi
mapfile -t lines < "${var_input_file}"
if (( ${#lines[@]} != 1 )); then
do_log "fatal" "file_only" "Password file '${var_input_file}' MUST contain exactly one line."
do_log "fatal" "file_only" "0104() Password file '${var_input_file}' MUST contain exactly one line."
return "${ERR_READ_PASS_FILE}"
fi
@@ -71,7 +71,7 @@ read_password_file() {
var_output_file="${var_output_file%"${var_output_file##*[![:space:]]}"}" ### trailing
if [[ -z "${var_output_file}" ]]; then
do_log "fatal" "file_only" "Password file '${var_input_file}' contains only whitespace."
do_log "fatal" "file_only" "0104() Password file '${var_input_file}' contains only whitespace."
return "${ERR_READ_PASS_FILE}"
fi