Little things (#595)
This commit is contained in:
parent
d097b4ec0a
commit
c8fe115650
|
@ -31,6 +31,8 @@ sub setAuthSessionInfo {
|
|||
# Store password (deleted in checkRemoteId() if local policy does not accept
|
||||
# stored passwords)
|
||||
$req->{sessionInfo}->{'_password'} = $req->datas->{'password'};
|
||||
$req->{sessionInfo}->{authenticationLevel} =
|
||||
$req->datas->{rSessionInfo}->{authenticationLevel};
|
||||
PE_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -121,17 +121,17 @@ sub setAuthSessionInfo {
|
|||
my ( $self, $req ) = @_;
|
||||
|
||||
# authenticationLevel
|
||||
$self->{sessionInfo}->{authenticationLevel} = $self->authnLevel;
|
||||
$req->{sessionInfo}->{authenticationLevel} = $self->authnLevel;
|
||||
|
||||
# Store submitted password if set in configuration
|
||||
# WARNING: it can be a security hole
|
||||
if ( $self->conf->{storePassword} ) {
|
||||
$self->{sessionInfo}->{'_password'} = $req->datas->{'newpassword'}
|
||||
$req->{sessionInfo}->{'_password'} = $req->datas->{'newpassword'}
|
||||
|| $req->datas->{'password'};
|
||||
}
|
||||
|
||||
# Store user timezone
|
||||
$self->{sessionInfo}->{'_timezone'} = $self->{'timezone'};
|
||||
$req->{sessionInfo}->{'_timezone'} = $self->{'timezone'};
|
||||
|
||||
PE_OK;
|
||||
}
|
||||
|
|
|
@ -178,8 +178,6 @@ sub reloadConf {
|
|||
return 0
|
||||
unless ( $self->{"_$type"} = $self->loadPlugin($module) );
|
||||
}
|
||||
$self->_authentication->authnLevel(
|
||||
$self->conf->{ $self->conf->{authentication} . "AuthnLevel" // 0 } );
|
||||
|
||||
# Initialize trusted domain regexp
|
||||
if ( $self->conf->{trustedDomains}
|
||||
|
|
|
@ -245,7 +245,9 @@ sub authenticate {
|
|||
sub setAuthSessionInfo {
|
||||
my ( $self, $req ) = @_;
|
||||
my $ret = $self->_authentication->setAuthSessionInfo($req);
|
||||
if ( $ret == PE_OK and not( $req->sessionInfo->{authenticationLevel} ) ) {
|
||||
if ( $ret == PE_OK
|
||||
and not( defined $req->sessionInfo->{authenticationLevel} ) )
|
||||
{
|
||||
$self->lmLog( 'Authentication level is not set by auth module',
|
||||
'error' );
|
||||
}
|
||||
|
|
|
@ -159,6 +159,7 @@ sub do {
|
|||
and (
|
||||
$err != PE_REDIRECT
|
||||
or ( $err == PE_REDIRECT
|
||||
and $req->datas->{redirectFormMethod}
|
||||
and $req->datas->{redirectFormMethod} eq 'post' )
|
||||
)
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue
Block a user