mirror of
https://github.com/pocket-id/pocket-id.git
synced 2025-12-09 14:42:59 +03:00
fix: mark any callback url as valid if they contain a wildcard (#1006)
This commit is contained in:
@@ -14,9 +14,11 @@ export const callbackUrlSchema = z
|
||||
.nonempty()
|
||||
.refine(
|
||||
(val) => {
|
||||
if (val === '*') return true;
|
||||
if (val.includes('*')) {
|
||||
return true;
|
||||
}
|
||||
try {
|
||||
new URL(val.replace(/\*/g, 'x'));
|
||||
new URL(val);
|
||||
return true;
|
||||
} catch {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user