mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 05:58:34 +01:00
MDL-37061 always validate lang when setting session user
This should resolve problems with TinyMCE langs and some unknown MUCH caching issue.
This commit is contained in:
parent
03953061ca
commit
25336547e8
@ -1122,6 +1122,10 @@ function get_moodle_cookie() {
|
||||
function session_set_user($user) {
|
||||
$_SESSION['USER'] = $user;
|
||||
unset($_SESSION['USER']->description); // conserve memory
|
||||
if (isset($_SESSION['USER']->lang)) {
|
||||
// Make sure it is a valid lang pack name.
|
||||
$_SESSION['USER']->lang = clean_param($_SESSION['USER']->lang, PARAM_LANG);
|
||||
}
|
||||
sesskey(); // init session key
|
||||
|
||||
if (PHPUNIT_TEST) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user