From 433d0f1259d2680e372f4bfecadbaaa8207cb892 Mon Sep 17 00:00:00 2001 From: Christophe Maudoux Date: Tue, 17 Nov 2020 23:18:05 +0100 Subject: [PATCH] Fix warnings --- lemonldap-ng-portal/t/24-AuthKerberos.t | 2 +- lemonldap-ng-portal/t/30-Auth-and-issuer-SAML-POST.t | 2 +- lemonldap-ng-portal/t/30-SAML-POST-with-2F-UpgradeOnly.t | 6 +++--- .../32-Auth-and-issuer-OIDC-authorization_code-with-info.t | 6 +++--- .../t/64-StayConnected-with-2F-and-History.t | 2 +- lemonldap-ng-portal/t/75-2F-Registers.t | 2 +- lemonldap-ng-portal/t/78-2F-UpgradeOnly.t | 4 ++-- lemonldap-ng-portal/t/79-2F-Yubikey.t | 4 ++-- 8 files changed, 14 insertions(+), 14 deletions(-) diff --git a/lemonldap-ng-portal/t/24-AuthKerberos.t b/lemonldap-ng-portal/t/24-AuthKerberos.t index 95d59398e..86b6bd375 100644 --- a/lemonldap-ng-portal/t/24-AuthKerberos.t +++ b/lemonldap-ng-portal/t/24-AuthKerberos.t @@ -154,7 +154,7 @@ SKIP: { ), 'Push fake kerberos in an allowed domain' ); - my $id = expectCookie($res); + $id = expectCookie($res); } count($maintests); diff --git a/lemonldap-ng-portal/t/30-Auth-and-issuer-SAML-POST.t b/lemonldap-ng-portal/t/30-Auth-and-issuer-SAML-POST.t index 93d0ac04a..74ba5fcf0 100644 --- a/lemonldap-ng-portal/t/30-Auth-and-issuer-SAML-POST.t +++ b/lemonldap-ng-portal/t/30-Auth-and-issuer-SAML-POST.t @@ -141,7 +141,7 @@ SKIP: { # Verify authentication on SP expectRedirection( $res, 'http://auth.sp.com' ); my $spId = expectCookie($res); - my $rawCookie = getHeader( $res, 'Set-Cookie' ); + $rawCookie = getHeader( $res, 'Set-Cookie' ); ok( $rawCookie =~ /;\s*SameSite=None/, 'Found SameSite=None' ); ok( $res = $sp->_get( '/', cookie => "lemonldap=$spId" ), 'Get / on SP' ); diff --git a/lemonldap-ng-portal/t/30-SAML-POST-with-2F-UpgradeOnly.t b/lemonldap-ng-portal/t/30-SAML-POST-with-2F-UpgradeOnly.t index fe2b9ef5b..1ad7d3a94 100644 --- a/lemonldap-ng-portal/t/30-SAML-POST-with-2F-UpgradeOnly.t +++ b/lemonldap-ng-portal/t/30-SAML-POST-with-2F-UpgradeOnly.t @@ -170,7 +170,7 @@ qr%(\d{4})%, 'Found 2F code in mail' ) or print STDERR Dumper( mail() ); - my $code = $1; + $code = $1; $s =~ s/code=/code=${code}/; ok( @@ -265,7 +265,7 @@ qr%_get( '/', cookie => "lemonldap=$spId" ), 'Get / on SP' ); expectOK($res); diff --git a/lemonldap-ng-portal/t/32-Auth-and-issuer-OIDC-authorization_code-with-info.t b/lemonldap-ng-portal/t/32-Auth-and-issuer-OIDC-authorization_code-with-info.t index 14d9c66ca..0dea07b46 100644 --- a/lemonldap-ng-portal/t/32-Auth-and-issuer-OIDC-authorization_code-with-info.t +++ b/lemonldap-ng-portal/t/32-Auth-and-issuer-OIDC-authorization_code-with-info.t @@ -12,7 +12,7 @@ BEGIN { } my $debug = 'error'; -my ( $op, $rp, $res ); +my ( $op, $rp, $res, $url ); my $access_token; @@ -89,7 +89,7 @@ count(3); # Do a user login to have an existing session -my $res; +$res; my $query = "user=french&password=french"; ok( $res = $op->_post( @@ -112,7 +112,7 @@ count(1); # Query RP for auth ok( $res = $rp->_get( '/', accept => 'text/html' ), 'Unauth SP request' ); count(1); -my ( $url, $query ) = +( $url, $query ) = expectRedirection( $res, qr#http://auth.op.com(/oauth2/authorize)\?(.*)$# ); # Push request to OP diff --git a/lemonldap-ng-portal/t/64-StayConnected-with-2F-and-History.t b/lemonldap-ng-portal/t/64-StayConnected-with-2F-and-History.t index 74d709f2f..7be28c4a3 100644 --- a/lemonldap-ng-portal/t/64-StayConnected-with-2F-and-History.t +++ b/lemonldap-ng-portal/t/64-StayConnected-with-2F-and-History.t @@ -367,7 +367,7 @@ JjTJecOOS+88fK8qL1TrYv5rapIdqUI7aQ== ) or print STDERR Dumper( $res->[2]->[0] ); ok( $res->[2]->[0] =~ /trspan="lastLogins"/, 'History found' ) or explain( $res->[2]->[0], 'trspan="lastLogins"' ); - my @c = ( $res->[2]->[0] =~ /127.0.0.1/gs ); + @c = ( $res->[2]->[0] =~ /127.0.0.1/gs ); # History with 3 successLogins ok( @c == 3, " -> Three entries found" ) diff --git a/lemonldap-ng-portal/t/75-2F-Registers.t b/lemonldap-ng-portal/t/75-2F-Registers.t index 9fda503a0..6bb3d5644 100644 --- a/lemonldap-ng-portal/t/75-2F-Registers.t +++ b/lemonldap-ng-portal/t/75-2F-Registers.t @@ -490,7 +490,7 @@ JjTJecOOS+88fK8qL1TrYv5rapIdqUI7aQ== or print STDERR Dumper($res); # No 2F device left - my @sf = map m%[2]->[0]; ok( scalar @sf == 0, 'No 2F device found' ) or print STDERR Dumper($res); diff --git a/lemonldap-ng-portal/t/78-2F-UpgradeOnly.t b/lemonldap-ng-portal/t/78-2F-UpgradeOnly.t index 95e56b559..563b27b35 100644 --- a/lemonldap-ng-portal/t/78-2F-UpgradeOnly.t +++ b/lemonldap-ng-portal/t/78-2F-UpgradeOnly.t @@ -113,7 +113,7 @@ ok( ); count(1); -( my $host, my $url, $query ) = +( $host, $url, $query ) = expectForm( $res, undef, '/upgradesession', 'confirm', 'url' ); # Accept session upgrade @@ -131,7 +131,7 @@ ok( ); count(1); -my $pdata = expectCookie( $res, 'lemonldappdata' ); +$pdata = expectCookie( $res, 'lemonldappdata' ); ( $host, $url, $query ) = expectForm( $res, undef, '/mail2fcheck?skin=bootstrap', 'token', 'code' ); diff --git a/lemonldap-ng-portal/t/79-2F-Yubikey.t b/lemonldap-ng-portal/t/79-2F-Yubikey.t index d65f28272..c6ea879ae 100644 --- a/lemonldap-ng-portal/t/79-2F-Yubikey.t +++ b/lemonldap-ng-portal/t/79-2F-Yubikey.t @@ -90,7 +90,7 @@ SKIP: { ); count(1); - my ( $host, $url, $query ) = + ( $host, $url, $query ) = expectForm( $res, undef, '/yubikey2fcheck?skin=bootstrap', 'token', 'code' ); @@ -121,7 +121,7 @@ SKIP: { ); count(1); - my ( $host, $url, $query ) = + ( $host, $url, $query ) = expectForm( $res, undef, '/yubikey2fcheck?skin=bootstrap', 'token', 'code' );