mirror of
https://github.com/osixia/container-openldap.git
synced 2026-11-06 12:40:36 -04:00
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 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
a762bda77d
commit
52b2918ea8
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user