From 52b2918ea894e11cae8b405c8fd47aad33abd6ef Mon Sep 17 00:00:00 2001 From: Bertrand Gouny Date: Tue, 13 Oct 2026 22:04:51 +0200 Subject: [PATCH] fix(ctl): hash passwords with special characters correctly The password was expanded before eval and parsed again as shell code, so spaces, $ or ; changed the hashed value or ran extra commands. Co-Authored-By: Claude Opus 5.5 --- services/openldap/assets/openldap-ctl/command/password.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/services/openldap/assets/openldap-ctl/command/password.sh b/services/openldap/assets/openldap-ctl/command/password.sh index f0c381a..cd19ac2 100755 --- a/services/openldap/assets/openldap-ctl/command/password.sh +++ b/services/openldap/assets/openldap-ctl/command/password.sh @@ -19,10 +19,9 @@ hash() { if [ -z "${password}" ]; then container log fatal "Missing password argument" - exit 1 fi - eval "${OPENLDAP_CTL_PASSWORD_HASH_CMD}" -s "${password}" + eval "${OPENLDAP_CTL_PASSWORD_HASH_CMD}"' -s "${password}"' } usage() {