mirror of
https://github.com/lldap/lldap.git
synced 2026-06-09 21:10:25 +00:00
bootstrap: Reintroduce LLDAP_USER_PASSWORD
Ensure no passwords are leaked via cmdline.
This commit is contained in:
@@ -712,9 +712,9 @@ main() {
|
|||||||
redundant_users="$(printf '%s' "$redundant_users" | jq --compact-output --arg id "$id" '. - [$id]')"
|
redundant_users="$(printf '%s' "$redundant_users" | jq --compact-output --arg id "$id" '. - [$id]')"
|
||||||
|
|
||||||
if [[ "$password_file" != 'null' ]] && [[ "$password_file" != '""' ]]; then
|
if [[ "$password_file" != 'null' ]] && [[ "$password_file" != '""' ]]; then
|
||||||
"$LLDAP_SET_PASSWORD_PATH" --base-url "$LLDAP_URL" --token "$TOKEN" --username "$id" --password "$(cat $password_file)"
|
LLDAP_USER_PASSWORD="$(< "$password_file")" "$LLDAP_SET_PASSWORD_PATH" --base-url "$LLDAP_URL" --token "$TOKEN" --username "$id"
|
||||||
elif [[ "$password" != 'null' ]] && [[ "$password" != '""' ]]; then
|
elif [[ "$password" != 'null' ]] && [[ "$password" != '""' ]]; then
|
||||||
"$LLDAP_SET_PASSWORD_PATH" --base-url "$LLDAP_URL" --token "$TOKEN" --username "$id" --password "$password"
|
LLDAP_USER_PASSWORD="$password" "$LLDAP_SET_PASSWORD_PATH" --base-url "$LLDAP_URL" --token "$TOKEN" --username "$id"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Process custom attributes
|
# Process custom attributes
|
||||||
|
|||||||
Reference in New Issue
Block a user