Repository navigation
fix: authUserSSO fills the tempPassword slot of its result array (#820) - #985
Open
ismisepaul wants to merge 1 commit into
Open
ismisepaul wants to merge 1 commit into
ismisepaul wants to merge 1 commit into
Conversation
authUserSSO assigned result[5] twice and never set result[3], so the "SSO logins can't change password" flag was overwritten and the tempPassword slot stayed null, unlike authUser's result. Set result[3] to "false" and log the right method name on exit. ACS doesn't read result[3] today, so this fixes the contract rather than a visible bug. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The narrowly scoped fix matches the authentication contract, includes a targeted regression test, and has no unresolved findings.
No open issues 🎉
What changed in this PR
Fixes #820 by aligning authUserSSO with the shared six-slot authentication result contract.
Changes:
- Sets the
tempPasswordslot to"false"instead of assigning thetempUsernameslot twice. - Corrects the authentication exit log to identify
authUserSSO. - Adds an integration regression test for the role and temporary-credential flags.
| File | Description |
|---|---|
src/main/java/dbProcs/Getter.java |
Corrects the result array assignment and exit log message. |
src/it/java/dbProcs/GetterAuthIT.java |
Adds regression coverage for the SSO result contract. |
Review effort: Balanced
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #820.
What
Getter.authUserSSOreturns the same 6-slot array asauthUser, but it had two copy-paste bugs:result[5]was assigned twice. The first value,"false"("SSO logins can't change password"), was overwritten straight away.result[3](thetempPasswordslot) was never set and stayednull.result[3]is now"false", since SSO users have no password to change. The exit log line also saysEnd authUserSSOinstead ofEnd authUser.ACSdoesn't readresult[3]today, so this fixes the contract rather than a visible bug. Any caller that didresult[3].equals(...)would have thrown an NPE.Tests
GetterAuthIT.ssoLoginResultFollowsAuthUserContractchecks the role,tempPassword == "false", and thattempUsernameis a boolean string. It fails ondev(expected: <false> but was: <null>) and passes with the fix.Every step of
test.ymlpassed locally (lint, build, PGP check, compose build, Tomcat config check, unit tests, integration tests). The branch also merges cleanly with #843, which changesGetter.javatoo.🤖 Generated with Claude Code