Permalink
Browse files

Revert "MDL-31248 - lib - prevent moodle_strtolower() silent discard …

…to lead to false-correct usernames"

This reverts commit c67bc65.
  • Loading branch information...
1 parent 281afcd commit f4f2b26ec57a7147b37bda779d21d8f257711f43 @stronk7 stronk7 committed Mar 9, 2012
Showing with 4 additions and 4 deletions.
  1. +4 −4 lib/moodlelib.php
View
8 lib/moodlelib.php
@@ -2765,12 +2765,12 @@ function get_moodle_cookie() {
return '';
} else {
$username = rc4decrypt($_COOKIE[$cookiename], true);
- $userdata = moodle_strtolower($username);
- $userdata = preg_replace('/[^-\.@_a-z0-9]/', '', $userdata);
+ $username = moodle_strtolower($username);
+ $userdata = preg_replace('/[^-\.@_a-z0-9]/', '', $username);
if ($username != $userdata) {
$username = rc4decrypt($_COOKIE[$cookiename]);
- $userdata = moodle_strtolower($username);
- $userdata = preg_replace('/[^-\.@_a-z0-9]/', '', $userdata);
+ $username = moodle_strtolower($username);
+ $userdata = preg_replace('/[^-\.@_a-z0-9]/', '', $username);
if ($userdata == $userdata) {
set_moodle_cookie($username);
} else {

0 comments on commit f4f2b26

Please sign in to comment.