Merge branch 'ent-10159-Server-side-request-forgery-in-api-checker' into 'develop'

fixed ssrf vulnerability

See merge request artica/pandorafms!5489
This commit is contained in:
Diego Muñoz-Reja 2023-02-01 15:45:29 +00:00
commit 997a8d5434
1 changed files with 9 additions and 0 deletions

View File

@ -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);