cauthy-auth 0.35.2 → 0.36.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -1
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -0
- package/dist/index.mjs.map +1 -1
- package/dist/react.d.mts +4 -0
- package/dist/react.d.ts +4 -0
- package/dist/react.js +39 -5
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +39 -5
- package/dist/react.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1095,6 +1095,12 @@ function random(bytes = 32) {
|
|
|
1095
1095
|
}
|
|
1096
1096
|
function localPath(candidate, fallback) {
|
|
1097
1097
|
if (!candidate || !candidate.startsWith("/") || candidate.startsWith("//") || candidate.includes("\\")) return fallback;
|
|
1098
|
+
if (/[\u0000-\u001f\u007f]/.test(candidate)) return fallback;
|
|
1099
|
+
try {
|
|
1100
|
+
if (new URL(candidate, "http://x").origin !== "http://x") return fallback;
|
|
1101
|
+
} catch {
|
|
1102
|
+
return fallback;
|
|
1103
|
+
}
|
|
1098
1104
|
return candidate;
|
|
1099
1105
|
}
|
|
1100
1106
|
function json(body, status = 200, headers) {
|