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);
|
||||
if (empty($data) === false) {
|
||||
$url .= http_build_query($data);
|
||||
|
|
Loading…
Reference in New Issue