This commit is contained in:
Christophe Maudoux 2020-08-28 21:53:19 +02:00
parent 759a006ae9
commit 779fd983e5
18 changed files with 27 additions and 27 deletions

View File

@ -3063,7 +3063,7 @@ sub sendSLOErrorResponse {
"Could not set empty session in logout object", 500 ); "Could not set empty session in logout object", 500 );
} }
# Send unvalidated SLO response # Send invalidated SLO response
return $self->sendLogoutResponseToServiceProvider( $req, $logout, $method ); return $self->sendLogoutResponseToServiceProvider( $req, $logout, $method );
} }

View File

@ -234,7 +234,7 @@ sub _certificateReset {
); );
if ( my $error = $self->p->process( $req, useMail => $searchByMail ) ) { if ( my $error = $self->p->process( $req, useMail => $searchByMail ) ) {
if ( $error == PE_USERNOTFOUND or $error == PE_BADCREDENTIALS ) { if ( $error == PE_USERNOTFOUND or $error == PE_BADCREDENTIALS ) {
$self->userLogger->warn( 'Reset asked for an unvalid user (' $self->userLogger->warn( 'Reset asked for an invalid user ('
. $req->param('mail') . $req->param('mail')
. ')' ); . ')' );

View File

@ -274,7 +274,7 @@ sub check {
$self->logger->info("\"$user\" is an unrestricted user!") if $unUser; $self->logger->info("\"$user\" is an unrestricted user!") if $unUser;
unless ( $unUser || $self->idRule->( $req, $attrs ) ) { unless ( $unUser || $self->idRule->( $req, $attrs ) ) {
$self->userLogger->warn( $self->userLogger->warn(
"checkUser requested for an unvalid user ($user)"); "checkUser requested for an invalid user ($user)");
$req->{sessionInfo} = {}; $req->{sessionInfo} = {};
$self->logger->debug('Identity not authorized'); $self->logger->debug('Identity not authorized');
$req->error(PE_BADCREDENTIALS) $req->error(PE_BADCREDENTIALS)
@ -427,7 +427,7 @@ sub _userData {
if ( my $error = $self->p->process($req) ) { if ( my $error = $self->p->process($req) ) {
if ( $error == PE_BADCREDENTIALS ) { if ( $error == PE_BADCREDENTIALS ) {
$self->userLogger->warn( $self->userLogger->warn(
'checkUser requested for an unvalid user (' 'checkUser requested for an invalid user ('
. $req->{user} . $req->{user}
. ")" ); . ")" );
} }

View File

@ -216,7 +216,7 @@ sub _switchContext {
); );
if ( my $error = $self->p->process($req) ) { if ( my $error = $self->p->process($req) ) {
$self->userLogger->warn( $self->userLogger->warn(
'ContextSwitching requested for an unvalid user (' 'ContextSwitching requested for an invalid user ('
. $req->{user} . $req->{user}
. ")" ) . ")" )
if ( $error == PE_BADCREDENTIALS ); if ( $error == PE_BADCREDENTIALS );
@ -229,7 +229,7 @@ sub _switchContext {
$self->logger->info("\"$realId\" is an unrestricted user!") if $unUser; $self->logger->info("\"$realId\" is an unrestricted user!") if $unUser;
unless ( $unUser || $self->idRule->( $req, $req->sessionInfo ) ) { unless ( $unUser || $self->idRule->( $req, $req->sessionInfo ) ) {
$self->userLogger->warn( $self->userLogger->warn(
'ContextSwitching requested for an unvalid user (' 'ContextSwitching requested for an invalid user ('
. $req->{user} . $req->{user}
. ")" ); . ")" );
$self->logger->debug('Identity NOT authorized'); $self->logger->debug('Identity NOT authorized');

View File

@ -139,7 +139,7 @@ sub globalLogout {
} }
else { else {
$self->userLogger->warn( $self->userLogger->warn(
"GlobalLogout called with an unvalid token"); "GlobalLogout called with an invalid token");
$res = PE_TOKENEXPIRED; $res = PE_TOKENEXPIRED;
} }
} }

View File

@ -215,7 +215,7 @@ sub _userData {
if ( my $error = $self->p->process($req) ) { if ( my $error = $self->p->process($req) ) {
if ( $error == PE_BADCREDENTIALS ) { if ( $error == PE_BADCREDENTIALS ) {
$self->userLogger->warn( $self->userLogger->warn(
'Impersonation requested for an unvalid user (' 'Impersonation requested for an invalid user ('
. $req->{user} . $req->{user}
. ")" ); . ")" );
} }
@ -229,7 +229,7 @@ sub _userData {
$self->logger->info("\"$realId\" is an unrestricted user!") if $unUser; $self->logger->info("\"$realId\" is an unrestricted user!") if $unUser;
unless ( $unUser || $self->idRule->( $req, $req->sessionInfo ) ) { unless ( $unUser || $self->idRule->( $req, $req->sessionInfo ) ) {
$self->userLogger->warn( $self->userLogger->warn(
'Impersonation requested for an unvalid user (' 'Impersonation requested for an invalid user ('
. $req->{user} . $req->{user}
. ")" ); . ")" );
$self->logger->debug('Identity NOT authorized'); $self->logger->debug('Identity NOT authorized');

View File

@ -194,7 +194,7 @@ sub _reset {
); );
if ( my $error = $self->p->process( $req, useMail => $searchByMail ) ) { if ( my $error = $self->p->process( $req, useMail => $searchByMail ) ) {
if ( $error == PE_USERNOTFOUND or $error == PE_BADCREDENTIALS ) { if ( $error == PE_USERNOTFOUND or $error == PE_BADCREDENTIALS ) {
$self->userLogger->warn( 'Reset asked for an unvalid user (' $self->userLogger->warn( 'Reset asked for an invalid user ('
. $req->param('mail') . $req->param('mail')
. ')' ); . ')' );

View File

@ -163,7 +163,7 @@ sub removeOther {
} }
else { else {
$self->userLogger->warn( $self->userLogger->warn(
"SingleSession called with an unvalid token"); "SingleSession called with an invalid token");
$res = PE_TOKENEXPIRED; $res = PE_TOKENEXPIRED;
} }
} }

View File

@ -55,7 +55,7 @@ expectOK($res);
my $id = expectCookie($res); my $id = expectCookie($res);
expectForm( $res, undef, '/notifback', 'reference1x1' ); expectForm( $res, undef, '/notifback', 'reference1x1' );
# Verify that cookie is ciphered (session unvalid) # Verify that cookie is ciphered (session invalid)
ok( ok(
$res = $client->_get( $res = $client->_get(
'/', cookie => "lemonldap=$id", '/', cookie => "lemonldap=$id",
@ -82,7 +82,7 @@ expectOK($res);
$id = expectCookie($res); $id = expectCookie($res);
expectForm( $res, undef, '/notifback', 'reference1x1' ); expectForm( $res, undef, '/notifback', 'reference1x1' );
# Verify that cookie is ciphered (session unvalid) # Verify that cookie is ciphered (session invalid)
ok( ok(
$res = $client->_get( $res = $client->_get(
'/', cookie => "lemonldap=$id", '/', cookie => "lemonldap=$id",

View File

@ -64,7 +64,7 @@ SKIP: {
my $id = expectCookie($res); my $id = expectCookie($res);
expectForm( $res, undef, '/notifback', 'reference1x1' ); expectForm( $res, undef, '/notifback', 'reference1x1' );
# Verify that cookie is ciphered (session unvalid) # Verify that cookie is ciphered (session invalid)
ok( ok(
$res = $client->_get( $res = $client->_get(
'/', cookie => "lemonldap=$id", '/', cookie => "lemonldap=$id",
@ -90,7 +90,7 @@ SKIP: {
$id = expectCookie($res); $id = expectCookie($res);
expectForm( $res, undef, '/notifback', 'reference1x1', 'reference1x2' ); expectForm( $res, undef, '/notifback', 'reference1x1', 'reference1x2' );
# Verify that cookie is ciphered (session unvalid) # Verify that cookie is ciphered (session invalid)
ok( ok(
$res = $client->_get( $res = $client->_get(
'/', cookie => "lemonldap=$id", '/', cookie => "lemonldap=$id",

View File

@ -137,7 +137,7 @@ q{INSERT INTO notifications VALUES ('rtyler','testref2','2050-05-30 00:00:00',?,
or print STDERR Dumper( $res->[2]->[0] ); or print STDERR Dumper( $res->[2]->[0] );
expectForm( $res, undef, '/notifback', 'reference1x1', 'url' ); expectForm( $res, undef, '/notifback', 'reference1x1', 'url' );
# Verify that cookie is ciphered (session unvalid) # Verify that cookie is ciphered (session invalid)
ok( ok(
$res = $client->_get( $res = $client->_get(
'/', '/',

View File

@ -59,7 +59,7 @@ expectOK($res);
my $id = expectCookie($res); my $id = expectCookie($res);
expectForm( $res, undef, '/notifback', 'reference1x1', 'url' ); expectForm( $res, undef, '/notifback', 'reference1x1', 'url' );
# Verify that cookie is ciphered (session unvalid) # Verify that cookie is ciphered (session invalid)
ok( ok(
$res = $client->_get( $res = $client->_get(
'/', '/',

View File

@ -51,7 +51,7 @@ expectOK($res);
my $id = expectCookie($res); my $id = expectCookie($res);
expectForm( $res, undef, '/notifback', 'reference1x1', 'url' ); expectForm( $res, undef, '/notifback', 'reference1x1', 'url' );
# Verify that cookie is ciphered (session unvalid) # Verify that cookie is ciphered (session invalid)
ok( ok(
$res = $client->_get( $res = $client->_get(
'/', '/',
@ -97,7 +97,7 @@ expectOK($res);
$id = expectCookie($res); $id = expectCookie($res);
expectForm( $res, undef, '/notifback', 'reference1x1', 'url' ); expectForm( $res, undef, '/notifback', 'reference1x1', 'url' );
# Verify that cookie is ciphered (session unvalid) # Verify that cookie is ciphered (session invalid)
ok( ok(
$res = $client->_get( $res = $client->_get(
'/', '/',

View File

@ -145,7 +145,7 @@ SKIP: {
or print STDERR Dumper( $res->[2]->[0] ); or print STDERR Dumper( $res->[2]->[0] );
expectForm( $res, undef, '/notifback', 'reference1x1', 'url' ); expectForm( $res, undef, '/notifback', 'reference1x1', 'url' );
# Verify that cookie is ciphered (session unvalid) # Verify that cookie is ciphered (session invalid)
ok( ok(
$res = $client->_get( $res = $client->_get(
'/', '/',

View File

@ -108,7 +108,7 @@ qq{INSERT INTO notifications VALUES ('rtyler','testref2','2050-05-30 00:00:00','
ok( $res->[2]->[0] =~ /1x1x1/, ' Found ref' ); ok( $res->[2]->[0] =~ /1x1x1/, ' Found ref' );
expectForm( $res, undef, '/notifback', 'reference1x1', 'url' ); expectForm( $res, undef, '/notifback', 'reference1x1', 'url' );
# Verify that cookie is ciphered (session unvalid) # Verify that cookie is ciphered (session invalid)
ok( ok(
$res = $client->_get( $res = $client->_get(
'/', '/',

View File

@ -56,7 +56,7 @@ SKIP: {
my $id = expectCookie($res); my $id = expectCookie($res);
expectForm( $res, undef, '/notifback', 'reference1x1', 'url' ); expectForm( $res, undef, '/notifback', 'reference1x1', 'url' );
# Verify that cookie is ciphered (session unvalid) # Verify that cookie is ciphered (session invalid)
ok( ok(
$res = $client->_get( $res = $client->_get(
'/', '/',
@ -102,7 +102,7 @@ SKIP: {
$id = expectCookie($res); $id = expectCookie($res);
expectForm( $res, undef, '/notifback', 'reference1x1', 'url' ); expectForm( $res, undef, '/notifback', 'reference1x1', 'url' );
# Verify that cookie is ciphered (session unvalid) # Verify that cookie is ciphered (session invalid)
ok( ok(
$res = $client->_get( $res = $client->_get(
'/', '/',

View File

@ -128,7 +128,7 @@ count(2);
( $host, $url, $query ) = ( $host, $url, $query ) =
expectForm( $res, undef, '/decryptvalue', 'cipheredValue', 'token' ); expectForm( $res, undef, '/decryptvalue', 'cipheredValue', 'token' );
# Unvalid ciphered value # invalid ciphered value
$query =~ s%cipheredValue=%cipheredValue=test%; $query =~ s%cipheredValue=%cipheredValue=test%;
ok( ok(
$res = $client->_post( $res = $client->_post(
@ -138,7 +138,7 @@ ok(
length => length($query), length => length($query),
accept => 'text/html', accept => 'text/html',
), ),
'POST decryptvalue with unvalid value' 'POST decryptvalue with invalid value'
); );
ok( $res->[2]->[0] =~ m%<span trspan="notAnEncryptedValue">%, ok( $res->[2]->[0] =~ m%<span trspan="notAnEncryptedValue">%,
'Found trspan="notAnEncryptedValue"' ) 'Found trspan="notAnEncryptedValue"' )

View File

@ -540,7 +540,7 @@ m%<div class="alert alert-warning alert"><div class="text-center"><span trspan="
) or explain( $res->[2]->[0], 'PE5 - Unknown identity' ); ) or explain( $res->[2]->[0], 'PE5 - Unknown identity' );
count(2); count(2);
# Request an unvalid identity # Request an invalid identity
$query =~ s/user=dwho/user=%*'/; $query =~ s/user=dwho/user=%*'/;
ok( ok(
$res = $client->_post( $res = $client->_post(
@ -556,7 +556,7 @@ ok(
$res->[2]->[0] =~ $res->[2]->[0] =~
m%<div class="alert alert-warning alert"><div class="text-center"><span trspan="PE5"></span></div></div>%, m%<div class="alert alert-warning alert"><div class="text-center"><span trspan="PE5"></span></div></div>%,
' PE5 found' ' PE5 found'
) or explain( $res->[2]->[0], 'PE5 - Unvalid identity' ); ) or explain( $res->[2]->[0], 'PE5 - invalid identity' );
count(2); count(2);
$client->logout($id); $client->logout($id);