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