Unverified Commit 34673924 authored by Dave Miller's avatar Dave Miller Committed by GitHub

Bug 1813629: Prevent Auth plugins from authenticating usernames with unicode variants

parent 5af7bc0b
...@@ -136,7 +136,19 @@ sub new { ...@@ -136,7 +136,19 @@ sub new {
$_[0] = $param; $_[0] = $param;
} }
} }
return $class->SUPER::new(@_);
$user = $class->SUPER::new(@_);
# MySQL considers some non-ascii characters such as umlauts to equal
# ascii characters returning a user when it should not.
if ($user && ref $param eq 'HASH' && exists $param->{name}) {
my $login = $param->{name};
if (lc $login ne lc $user->login) {
$user = undef;
}
}
return $user;
} }
sub super_user { sub super_user {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment