Commit c6365685 authored by Aaron Wells's avatar Aaron Wells Committed by Gerrit Code Review
Browse files

Limit CURL to only HTTP & HTTPS

Bug 1394820

Change-Id: I710098cb96ac7d0868926a95c4b4488df4753e4c
parent f8c29ac3
......@@ -3806,6 +3806,7 @@ function mahara_http_request($config, $quiet=false) {
$ch = curl_init();
// standard curl_setopt stuff; configs passed to the function can override these
curl_setopt($ch, CURLOPT_PROTOCOLS, CURLPROTO_HTTP | CURLPROTO_HTTPS);
curl_setopt($ch, CURLOPT_TIMEOUT, 60);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
if (!ini_get('open_basedir')) {
......@@ -3870,6 +3871,7 @@ function mahara_shorturl_request($url, $quiet=false) {
$ch = curl_init($url);
// standard curl_setopt stuff; configs passed to the function can override these
curl_setopt($ch, CURLOPT_PROTOCOLS, CURLPROTO_HTTP | CURLPROTO_HTTPS);
curl_setopt($ch, CURLOPT_TIMEOUT, 60);
curl_setopt($ch, CURLOPT_HEADER, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment