Skip to content

fix: authUserSSO fills the tempPassword slot of its result array (#820) - #985

Open
ismisepaul wants to merge 1 commit into
devfrom
dev#820-authusersso-result
Open

ismisepaul wants to merge 1 commit into
devfrom
dev#820-authusersso-result

Conversation

@ismisepaul

Copy link
Copy Markdown
Member

Fixes #820.

What

Getter.authUserSSO returns the same 6-slot array as authUser, 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] (the tempPassword slot) was never set and stayed null.

result[3] is now "false", since SSO users have no password to change. The exit log line also says End authUserSSO instead of End authUser.

ACS doesn't read result[3] today, so this fixes the contract rather than a visible bug. Any caller that did result[3].equals(...) would have thrown an NPE.

Tests

GetterAuthIT.ssoLoginResultFollowsAuthUserContract checks the role, tempPassword == "false", and that tempUsername is a boolean string. It fails on dev (expected: <false> but was: <null>) and passes with the fix.

Every step of test.yml passed locally (lint, build, PGP check, compose build, Tomcat config check, unit tests, integration tests). The branch also merges cleanly with #843, which changes Getter.java too.

🤖 Generated with Claude Code

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>
@ismisepaul ismisepaul added this to the 4.0.0 milestone Oct 24, 2026
@ismisepaul ismisepaul added the Bug label Oct 24, 2026
Copilot AI balanced review requested due to automatic review settings October 24, 2026 23:38
@ismisepaul ismisepaul moved this from Backlog to Next Release Backlog in Security Shepherd Oct 24, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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 tempPassword slot to "false" instead of assigning the tempUsername slot 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

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Next Release Backlog

Development

Successfully merging this pull request may close these issues.

authUserSSO result array: result[3] unset, result[5] double-assigned, wrong log message

2 participants