We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8a7443e commit 11354aaCopy full SHA for 11354aa
components/server/src/express-util.ts
@@ -191,10 +191,12 @@ export function validateReturnToUrlWithPatterns(
191
return url.pathname === "/";
192
}
193
194
- // Check if pathname matches any allowed pattern
195
- const isAllowedPath = allowedPatterns.some((pattern) => pattern.test(url.pathname));
196
- if (!isAllowedPath) {
197
- return false;
+ if (allowedPatterns && allowedPatterns.length != 0) {
+ // Check if pathname matches any allowed pattern
+ const isAllowedPath = allowedPatterns.some((pattern) => pattern.test(url.pathname));
+ if (!isAllowedPath) {
198
+ return false;
199
+ }
200
201
202
// For complete-auth, require ONLY message parameter (used by OAuth flows)
0 commit comments