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 1e2edea commit b62af1fCopy full SHA for b62af1f
1 file changed
app/Services/SanitizeService.php
@@ -219,11 +219,16 @@ public function isLocalObject($url): bool
219
return false;
220
}
221
222
+ $parsed = parse_url($url);
223
+ if (! $parsed || ! isset($parsed['scheme']) || $parsed['scheme'] !== 'https') {
224
+ return false;
225
+ }
226
+
227
$app = parse_url(config('app.url'));
228
$appHost = strtolower(data_get($app, 'host'));
- $urlHost = parse_url($url, PHP_URL_HOST);
229
+ $urlHost = strtolower(data_get($parsed, 'host'));
230
- return $appHost === strtolower($urlHost);
231
+ return $appHost === $urlHost;
232
233
234
/**
0 commit comments