Force UTF8 decoding of loginHistory values (#1117)

This commit is contained in:
Clément Oudot 2016-12-12 14:32:00 +00:00
parent b07ec51e0c
commit b8997aa43d
1 changed files with 4 additions and 0 deletions

View File

@ -2199,6 +2199,10 @@ sub registerLogin {
if ( $self->{loginHistoryEnabled} ) {
my $history = $self->{sessionInfo}->{loginHistory} ||= {};
foreach ( @{ $history->{failedLogin} } ) {
utf8::decode( $_->{error} );
}
my $type = ( $errorCode ? "failed" : "success" ) . "Login";
$history->{$type} ||= [];
$self->lmLog( "Current login saved into $type", "debug" );