Merge branch 'MDL-64152-401' of https://github.com/snake/moodle into MOODLE_401_STABLE
This commit is contained in:
@@ -19,6 +19,9 @@ LTI-Tool-Provider-Library-PHP repo has been archived so it doesn't accept pull r
|
||||
* MDL-71920: Migrated from curl_exec and friends to use our Moodle curl wrapper,
|
||||
so we can better handle site security settings
|
||||
|
||||
This local change has been made without the accompanying pull request as the upstream library is archived:
|
||||
* $FULLME is used as the URL for OAuth, to fix reverse proxy support (see MDL-64152)
|
||||
|
||||
It is recommended by upstream to install depdencies via composer - but the composer installation is bundled
|
||||
with an autoloader so it's better to do it manually.
|
||||
|
||||
|
||||
@@ -34,14 +34,8 @@ class OAuthRequest {
|
||||
*/
|
||||
public static function from_request($http_method = null, $http_url = null, $parameters = null) {
|
||||
|
||||
$scheme = (!isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] != "on")
|
||||
? 'http'
|
||||
: 'https';
|
||||
$http_url = ($http_url) ? $http_url : $scheme .
|
||||
'://' . $_SERVER['SERVER_NAME'] .
|
||||
':' .
|
||||
$_SERVER['SERVER_PORT'] .
|
||||
$_SERVER['REQUEST_URI'];
|
||||
global $FULLME;
|
||||
$http_url = $http_url ?: $FULLME;
|
||||
$http_method = ($http_method) ? $http_method : $_SERVER['REQUEST_METHOD'];
|
||||
|
||||
// We weren't handed any parameters, so let's find the ones relevant to
|
||||
|
||||
Reference in New Issue
Block a user