8000 Only allow email parameter in UpdateEmail.requiredActionChallenge is forced by rmartinc · Pull Request #55532 · keycloak/keycloak · GitHub
[go: up one dir, main page]

Skip to content

Only allow email parameter in UpdateEmail.requiredActionChallenge is forced - #55532

Open
rmartinc wants to merge 1 commit into
keycloak:mainfrom
rmartinc:issue-55530
Open

rmartinc wants to merge 1 commit into
keycloak:mainfrom
rmartinc:issue-55530

Conversation

@rmartinc
Copy link
Copy Markdown
Contributor

Closes #55530

Protect the UpdateEmail.requiredActionChallenge to only accept the incoming email parameter if the verification was forced by the update profile. If not, starting the flow requires to present the challenge normally and send the sessiobn_code parameter. Test added.

…forced

Closes keycloak#55530

Signed-off-by: rmartinc <rmartinc@redhat.com>
@rmartinc
rmartinc requested review from a team as code owners November 25, 2026 16:40
Copilot AI balanced review requested due to automatic review settings November 25, 2026 16:40
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

No active review issues were identified for the change restricting when the update-email action accepts request-supplied email addresses.

No open issues 🎉

What changed in this PR

This PR addresses #55530 by restricting when Keycloak’s update-email action accepts an email directly from request parameters, preventing confirmation from being triggered without the normal form submission.

Changes:

  • Accept an incoming email during the initial challenge only when email verification was explicitly forced.
  • Mark forced verification when handing off from the update-profile action.
  • Add a regression test that removes session_code and execution and verifies that the email-entry page remains unchanged.
File Description
testsuite/​integration-arquillian/​tests/​base/​src/​test/​java/​org/​keycloak/​testsuite/​actions/​AppInitiatedActionUpdateEmailWithVerificationTest.java Tests submission without session and execution parameters.
testsuite/​integration-arquillian/​tests/​base/​src/​main/​java/​org/​keycloak/​testsuite/​pages/​EmailUpdatePage.java Adds an accessor for asserting the displayed email.
services/​src/​main/​java/​org/​keycloak/​authentication/​requiredactions/​UpdateProfile.java Marks the forced email-verification handoff.
services/​src/​main/​java/​org/​keycloak/​authentication/​requiredactions/​UpdateEmail.java Requires and consumes the forced-verification flag before accepting an incoming email.

Review effort: Balanced

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

UPDATE_EMAIL confirmation can be triggered without session_code

2 participants

0