@umituz/react-native-ai-fal-provider 3.2.1 → 3.2.3
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/package.json
CHANGED
|
@@ -38,11 +38,12 @@ function isValidAndSafeUrl(value: string): boolean {
|
|
|
38
38
|
try {
|
|
39
39
|
const url = new URL(value);
|
|
40
40
|
// Reject URLs with @ (potential auth bypass: http://attacker.com@internal.server/)
|
|
41
|
-
|
|
41
|
+
const urlAny = url as unknown as { hostname: string; username: string };
|
|
42
|
+
if (url.href.includes('@') && urlAny.username) {
|
|
42
43
|
return false;
|
|
43
44
|
}
|
|
44
45
|
// Ensure domain exists
|
|
45
|
-
if (!
|
|
46
|
+
if (!urlAny.hostname || urlAny.hostname.length === 0) {
|
|
46
47
|
return false;
|
|
47
48
|
}
|
|
48
49
|
return true;
|