Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
5916ccc3
Commit
5916ccc3
authored
Nov 24, 2014
by
Aaron Wells
Browse files
Limit CURL to only HTTP & HTTPS
Bug 1394820 Change-Id: I710098cb96ac7d0868926a95c4b4488df4753e4c
parent
dacd3f03
Changes
1
Hide whitespace changes
Inline
Side-by-side
htdocs/lib/web.php
View file @
5916ccc3
...
...
@@ -3948,6 +3948,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'
))
{
...
...
@@ -4012,6 +4013,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
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment