V8.00.000.2025.06.17
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 44s
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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user