fix(e2e): trim bootstrap password before hashing (BUNYIP-166) #186
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/BUNYIP-166-bootstrap-trim-password"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Fixes
bunyip-e2e-bootstraphashing the password with incidental surrounding whitespace, which caused a staging login to fail with"email or password incorrect"even though the seed value andE2E_STAGING_PASSWORDmatched character-for-character.The asymmetry:
&password(onlypassword.trim().is_empty()was checked).e2e/lib/env.tsrequired()->value.trim()).auth_pages.rs).So a seed value with a trailing
\nstored a hash for"P\n"while the suite sent"P". Now the bootstrap trims before hashing (.hash(password.trim())), matching the suite.Test
Not compiled locally (musl/dunite workspace); CI validates. Trivial string-trim,
passwordis now&str, no type impact. Empty/whitespace-only still bails.Deploy / unblock
The existing seeded account still carries the old (whitespaced) hash until re-seeded. After this lands: rebuild the image, redeploy c-01, then
just e2e-bootstrapagain (now trims). Immediate workaround without waiting for this: re-seed with a whitespace-clean value, since the suite already trims.#BUNYIP-166