Remove obsolete $_SERVER['MAHARA_LIBDIR'] option
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mahara |
Fix Released
|
Low
|
Unassigned | ||
15.10 |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
One of the oldest lines of code in the current Mahara codebase, is an undocumented feature in init.php. It checks for $_SERVER[
The $_SERVER superglobal is populated by the SAPI that's running PHP. If you're using mod_php, you can set it using the Apache directive "SetEnv MAHARA_LIBDIR /path/to/libdir". If you're executing PHP from the command-line, you can set it by exporting an environment fariable, i.e. "MAHARA_
There's really no reason to have this code in place. There is no supported Mahara hosting use-case where you would need the lib directory to be in a non-standard location. And as such, all this does is provide a potential vector for errors and attacks. So, I'm going to remove it.
Changed in mahara: | |
status: | In Progress → Fix Committed |
Changed in mahara: | |
status: | Fix Committed → Fix Released |
Patch for "master" branch: https:/ /reviews. mahara. org/4857