mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #27301
[Bug 1465882] [NEW] Remove obsolete $_SERVER['MAHARA_LIBDIR'] option
Public bug reported:
One of the oldest lines of code in the current Mahara codebase, is an
undocumented feature in init.php. It checks for
$_SERVER['MAHARA_LIBDIR'], and if this is present, it uses this location
for $CFG->libdir instead of the default location $CFG->docroot/lib.
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_LIBDIR=/path/to/libdir; export MAHARA_LIBDIR; php
htdocs/lib/cron.php"
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.
** Affects: mahara
Importance: Low
Status: In Progress
--
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1465882
Title:
Remove obsolete $_SERVER['MAHARA_LIBDIR'] option
Status in Mahara ePortfolio:
In Progress
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['MAHARA_LIBDIR'], and if this is present, it uses this
location for $CFG->libdir instead of the default location
$CFG->docroot/lib.
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_LIBDIR=/path/to/libdir; export MAHARA_LIBDIR; php
htdocs/lib/cron.php"
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.
To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1465882/+subscriptions
Follow ups
References