Skip to content

fix: prevent redirects to /undefined after saml auth - #669

Merged
Agrendalath merged 1 commit into
opencraft-release/palm.1from
tecoholic/BB-9010-prevent-redirects-to-undefined-after-saml-auth
Aug 13, 2024
Merged

fix: prevent redirects to /undefined after saml auth#669
Agrendalath merged 1 commit into
opencraft-release/palm.1from
tecoholic/BB-9010-prevent-redirects-to-undefined-after-saml-auth

Conversation

@tecoholic

Copy link
Copy Markdown
Member

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 setup, they end up getting redirected to /undefined. This commit validates the redirectURL as a valid string before performing the redirect.

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

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 setup,
they end up getting redirected to /undefined. This commit
validates the redirectURL as a valid string before
performing the redirect.

Internal-ref: https://tasks.opencraft.com/browse/BB-9010
@tecoholic tecoholic self-assigned this Aug 9, 2024
@tecoholic
tecoholic requested a review from Agrendalath August 9, 2024 04:37

@Agrendalath Agrendalath 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.

👍

  • I tested this: tested that the undefined redirect no longer happens when the variable is not defined
  • I read through the code
  • I checked for accessibility issues: n/a
  • Includes documentation: n/a
  • Added to the Code Drift project board (for backports)

@Agrendalath
Agrendalath merged commit 9ade4ea into opencraft-release/palm.1 Aug 13, 2024
@Agrendalath
Agrendalath deleted the tecoholic/BB-9010-prevent-redirects-to-undefined-after-saml-auth branch August 13, 2024 21:19
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.

2 participants