mirror of
https://github.com/moodle/moodle.git
synced 2025-04-20 07:56:06 +02:00
Merge branch 'MDL-64152-master' of https://github.com/snake/moodle
This commit is contained in:
commit
7929267880
@ -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.
|
||||
|
||||
@ -72,4 +75,4 @@ enrol/lti/db/upgrade.php
|
||||
```
|
||||
cd lib/ltiprovider/src
|
||||
for file in `find . -name '*.php' `; do sed -i '/^class /i #[\\AllowDynamicProperties]' $file; done
|
||||
```
|
||||
```
|
||||
|
@ -35,14 +35,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
|
||||
|
Loading…
x
Reference in New Issue
Block a user