Commit 7e1119a8 authored by Christophe Maudoux's avatar Christophe Maudoux 🐛

Fix mistake & typo (#1664)

parent bf8040a7
...@@ -37,13 +37,13 @@ sub init { ...@@ -37,13 +37,13 @@ sub init {
$self->{rule} = $rule; $self->{rule} = $rule;
# Parse identity rule # Parse identity rule
$self->logger->debug( "Impersonation identity rule -> " $self->logger->debug( "Impersonation identities rule -> "
. $self->conf->{impersonationIdRule} ); . $self->conf->{impersonationIdRule} );
$rule = $rule =
$hd->buildSub( $hd->substitute( $self->conf->{impersonationIdRule} ) ); $hd->buildSub( $hd->substitute( $self->conf->{impersonationIdRule} ) );
unless ($rule) { unless ($rule) {
$self->error( $self->error(
"Bad impersonation identity rule -> " . $hd->tsv->{jail}->error ); "Bad impersonation identities rule -> " . $hd->tsv->{jail}->error );
return 0; return 0;
} }
$self->{idRule} = $rule; $self->{idRule} = $rule;
...@@ -150,13 +150,13 @@ sub _userDatas { ...@@ -150,13 +150,13 @@ sub _userDatas {
return $req->error($error); return $req->error($error);
} }
# Check identity rule # Check identities rule
unless ( $self->idRule->( $req, $req->sessionInfo ) ) { unless ( $self->idRule->( $req, $req->sessionInfo ) ) {
$self->userLogger->warn( $self->userLogger->warn(
'Impersonation requested for an unvalid user (' 'Impersonation requested for an unvalid user ('
. $req->{user} . $req->{user}
. ")" ); . ")" );
$req->sessionInfo = {}; $req->{sessionInfo} = {};
$self->logger->debug('Identity not authorized'); $self->logger->debug('Identity not authorized');
return $req->error(PE_BADCREDENTIALS); return $req->error(PE_BADCREDENTIALS);
} }
......
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