Skip to content

fix(redwood): prevent redirects to /undefined after saml auth - #670

Merged
Agrendalath merged 1 commit into
opencraft-release/redwood.1from
agrendalath/BB-9010-prevent-redirects-to-undefined-after-saml-auth-redwood-cherry-pick
Aug 15, 2024
Merged

fix(redwood): prevent redirects to /undefined after saml auth#670
Agrendalath merged 1 commit into
opencraft-release/redwood.1from
agrendalath/BB-9010-prevent-redirects-to-undefined-after-saml-auth-redwood-cherry-pick

Conversation

@Agrendalath

Copy link
Copy Markdown
Member

This cherry-picks #669 to Redwood.

Internal-ref: https://tasks.opencraft.com/browse/BB-9010

@Agrendalath
Agrendalath requested a review from tecoholic August 13, 2024 21:30
@Agrendalath Agrendalath self-assigned this Aug 13, 2024

@tecoholic tecoholic left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@Agrendalath Thank you for creating the PR. 👍

  • I tested this: Setup a redwood instance from the PR branch and verified that SAML authenticated users aren’t redirected to /undefined.
  • I read through the code
  • I checked for accessibility issues
  • Includes documentation

When a user authenticates using SAML, but their accounts aren't linked,
they land on the login page with the message to link their accounts. If the
`OC_REDIRECT_ON_TPA_UNLINKED_ACCOUNT` value is not set, they are redirected to
`/undefined`. This commit checks that the `redirectURL` is a valid non-empty
string before performing the redirect.

The bug was introduced in 91f8d36, so this can be safely dropped once that
temporary commit is removed from our branches. For Redwood, the relevant
commit hash is 64f5dea.

Internal-ref: https://tasks.opencraft.com/browse/BB-9010
(cherry picked from commit 9ade4ea)
@Agrendalath
Agrendalath force-pushed the agrendalath/BB-9010-prevent-redirects-to-undefined-after-saml-auth-redwood-cherry-pick branch from f5135a2 to 2d902ee Compare August 15, 2024 20:47
@Agrendalath
Agrendalath merged commit b801f99 into opencraft-release/redwood.1 Aug 15, 2024
@Agrendalath
Agrendalath deleted the agrendalath/BB-9010-prevent-redirects-to-undefined-after-saml-auth-redwood-cherry-pick branch August 15, 2024 21:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants