Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 3.5.11, 3.6.9, 3.7.5, 3.8.2, 3.9
-
Component/s: Administration, Installation
-
Labels:
-
Testing Instructions:
-
Difficulty:Easy
-
Affected Branches:MOODLE_35_STABLE, MOODLE_36_STABLE, MOODLE_37_STABLE, MOODLE_38_STABLE, MOODLE_39_STABLE
-
Fixed Branches:MOODLE_35_STABLE, MOODLE_36_STABLE, MOODLE_37_STABLE, MOODLE_38_STABLE
-
Pull from Repository:
-
Pull 3.5 Branch:
MDL-68125-regression-MOODLE_35_STABLE -
Pull 3.8 Branch:
MDL-68125-regression-MOODLE_38_STABLE -
Pull Master Branch:
MDL-68125-regression -
Pull Master Diff URL:
Description
This is a fix for a little regression introduced @ MDL-67861. Applies to all current branches (35 and up).
When these conditions happen:
- The site has debugging set to high levels + display errors enabled.
- The site has the handling of X-Forwarded-For headers enabled.
- There are some headers coming in the requests.
- The site is upgraded via web (CLI is immune to this).
This notice is shown in the initial 3-4 pages (login, env, db upgrade...) until the new settings are saved to DB (then the notice disappears forever):
Notice: Undefined property: stdClass::$reverseproxyignore in /opt/app/lib/moodlelib.php on line 9210"
|
So, this issue is about to avoid that notice to be shown, just that.
In the original issue, a simple change was proposed, FYC:
Maybe we can just change:
return !\core\ip_utils::is_ip_in_subnet_list($ip, $CFG->reverseproxyignore, ',');
by
return !\core\ip_utils::is_ip_in_subnet_list($ip, $CFG->reverseproxyignore ?? '', ',');
And that's all. Note the notice doesn't lead to any malfunctioning, it's just "ugly" for the sites matching all the conditions above.
CORRECTION TAKE#2 : Striking-through the previous -CORRECTION: it breaks login, so makes it imossible to upgrade sites through the Web UI.-
Ciao