Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 2.7.5, 2.8.2, 2.9
-
Component/s: Badges
-
Testing Instructions:
-
Affected Branches:MOODLE_27_STABLE, MOODLE_28_STABLE, MOODLE_29_STABLE
-
Fixed Branches:MOODLE_27_STABLE, MOODLE_28_STABLE
-
Pull from Repository:
-
Pull Master Branch:
MDL-49170_master -
Pull Master Diff URL:
Description
When connecting to Mozilla Backpack in /badges/backpackconnect.php, the assertion is verified using Mozilla Persona. However, if the port is specified in $CFG->wwwroot, the audience parameter is incorrect, because it is missing a colon.
/badges/backpackconnect.php |
// Line 50
|
$wwwparts = parse_url($CFG->wwwroot); |
$audience = $wwwparts['scheme'] . '://' . $wwwparts['host']; |
$audience .= isset($wwwparts['port']) ? $wwwparts['port'] : ''; |
If $CFG->wwwroot is, for example, https://www.example.com:443, the $audience variable will be incorrectly https://www.example.com443. A simple fix:
$audience .= isset($wwwparts['port']) ? ':' . $wwwparts['port'] : ''; |