Skip to content
Browse files

MDL-31248 - lib - Gah, erroneus condition fixed.

For sure that leaded to accept anything as valid username
for cookies in 19_STABLE. That explains why garbled username were
being transformed into "invented" usernames, instead of blank.
  • Loading branch information...
1 parent c67bc65 commit e85a54d931807e8eb407fac8024fd3877579332e @stronk7 stronk7 committed Mar 8, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/moodlelib.php
View
2 lib/moodlelib.php
@@ -2771,7 +2771,7 @@ function get_moodle_cookie() {
$username = rc4decrypt($_COOKIE[$cookiename]);
$userdata = moodle_strtolower($username);
$userdata = preg_replace('/[^-\.@_a-z0-9]/', '', $userdata);
- if ($userdata == $userdata) {
+ if ($username == $userdata) {
set_moodle_cookie($username);
} else {
$username = '';

0 comments on commit e85a54d

Please sign in to comment.
Something went wrong with that request. Please try again.