mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-29 08:45:12 +02:00
fixed ssrf vulnerability
This commit is contained in:
parent
6d2f4d7eac
commit
022ca1c6a4
@ -103,6 +103,15 @@ function api_execute(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$url_protocol = parse_url($url)['scheme'];
|
||||||
|
|
||||||
|
if ($url_protocol !== 'http' && $url_protocol !== 'https') {
|
||||||
|
return [
|
||||||
|
'url' => $url,
|
||||||
|
'result' => '',
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
$curlObj = curl_init($url);
|
$curlObj = curl_init($url);
|
||||||
if (empty($data) === false) {
|
if (empty($data) === false) {
|
||||||
$url .= http_build_query($data);
|
$url .= http_build_query($data);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user