Permalink
Browse files

Merge branch 'w49_MDL-37061_m24_invalidlang' of git://github.com/skod…

…ak/moodle into MOODLE_24_STABLE
  • Loading branch information...
2 parents eda1d3f + 7b03292 commit 6d0c04c208b411e2c702e1f36e7bc33bc90ad4ac Sam Hemelryk committed Dec 11, 2012
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/sessionlib.php
View
@@ -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) {

0 comments on commit 6d0c04c

Please sign in to comment.