Skip to content

Commit

Permalink
make query to delete user TOTP do a case-insensitive based on the use…
Browse files Browse the repository at this point in the history
…rname
  • Loading branch information
markdboyd committed Jul 31, 2024
1 parent 927ee6e commit 6489825
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion reset-totp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ address=$(bosh interpolate "${manifest}" --path /instance_groups/name=uaa/jobs/n
password=$(bosh interpolate "${manifest}" --path /instance_groups/name=uaa/jobs/name=uaa/properties/uaadb/roles/name=cfdb/password)
rm "${manifest}"

psql "postgres://cfdb:${password}@${address}:5432/uaadb" -c "delete from totp_seed where username = '${totp_username}'"
psql "postgres://cfdb:${password}@${address}:5432/uaadb" -c "delete from totp_seed where lower(username) = lower('${totp_username}')"

echo "Successfully reset the totp for ${totp_username}. Please notify the user."
echo "NOTE: Username is case-sensitive - if the user is unable to reset, recheck capitalization"
Expand Down

0 comments on commit 6489825

Please sign in to comment.