Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions lib/Mautic/Auth/OAuth.php
Original file line number Diff line number Diff line change
Expand Up @@ -623,10 +623,16 @@ public function makeRequest ($url, array $parameters = array(), $method = 'GET',
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_SSL_VERIFYPEER => false,
CURLOPT_HEADER => true,
CURLOPT_FOLLOWLOCATION => true
CURLOPT_HEADER => true
);

// CURLOPT_FOLLOWLOCATION cannot be activated when an open_basedir is set
if (ini_get('open_basedir')) {
$options[CURLOPT_FOLLOWLOCATION] = false;
} else {
$options[CURLOPT_FOLLOWLOCATION] = true;
}

//Set CURL headers for oauth 1.0 requests
if ($this->isOauth1()) {
$options[CURLOPT_HTTPHEADER] = $header;
Expand Down