Skip to content

Commit

Permalink
Update src/accounts/openid.js
Browse files Browse the repository at this point in the history
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
  • Loading branch information
lelemm and coderabbitai[bot] authored Nov 11, 2024
1 parent 4362254 commit 8d56358
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/accounts/openid.js
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,8 @@ export function isValidRedirectUrl(url) {
const redirectUrl = new URL(url);
const serverUrl = new URL(serverHostname);

if (redirectUrl.hostname === serverUrl.hostname) {
// Compare origin (protocol + hostname + port)
if (redirectUrl.origin === serverUrl.origin) {
return true;
} else {
return false;
Expand Down

0 comments on commit 8d56358

Please sign in to comment.