|
|
|
@ -16,7 +16,7 @@ my $client = LLNG::Manager::Test->new( { |
|
|
|
|
loginHistoryEnabled => 0, |
|
|
|
|
brutForceProtection => 0, |
|
|
|
|
portalMainLogo => 'common/logos/logo_llng_old.png', |
|
|
|
|
requireToken => 0, |
|
|
|
|
requireToken => 1, |
|
|
|
|
impersonationRule => 1, |
|
|
|
|
impersonationIdRule => '$uid ne "msmith"', |
|
|
|
|
impersonationUnrestrictedUsersRule => '$uid eq "dwho"', |
|
|
|
@ -28,7 +28,7 @@ my $client = LLNG::Manager::Test->new( { |
|
|
|
|
ok( $res = $client->_get( '/', accept => 'text/html' ), 'Get Menu', ); |
|
|
|
|
count(1); |
|
|
|
|
my ( $host, $url, $query ) = |
|
|
|
|
expectForm( $res, '#', undef, 'user', 'password', 'spoofId' ); |
|
|
|
|
expectForm( $res, '#', undef, 'user', 'password', 'spoofId', 'token' ); |
|
|
|
|
|
|
|
|
|
$query =~ s/user=/user=rtyler/; |
|
|
|
|
$query =~ s/password=/password=rtyler/; |
|
|
|
@ -59,8 +59,8 @@ $client->logout($id); |
|
|
|
|
## Try to Impersonate a forbidden identity |
|
|
|
|
ok( $res = $client->_get( '/', accept => 'text/html' ), 'Get Menu', ); |
|
|
|
|
count(1); |
|
|
|
|
my ( $host, $url, $query ) = |
|
|
|
|
expectForm( $res, '#', undef, 'user', 'password', 'spoofId' ); |
|
|
|
|
( $host, $url, $query ) = |
|
|
|
|
expectForm( $res, '#', undef, 'user', 'password', 'spoofId', 'token' ); |
|
|
|
|
|
|
|
|
|
$query =~ s/user=/user=rtyler/; |
|
|
|
|
$query =~ s/password=/password=rtyler/; |
|
|
|
@ -83,10 +83,8 @@ m%<div class="message message-negative alert"><span trmsg="5">%, |
|
|
|
|
count(2); |
|
|
|
|
|
|
|
|
|
## Try to Impersonate a forbidden identity with an Unrestricted user |
|
|
|
|
ok( $res = $client->_get( '/', accept => 'text/html' ), 'Get Menu', ); |
|
|
|
|
count(1); |
|
|
|
|
( $host, $url, $query ) = |
|
|
|
|
expectForm( $res, '#', undef, 'user', 'password', 'spoofId' ); |
|
|
|
|
expectForm( $res, '#', undef, 'user', 'password', 'spoofId', 'token' ); |
|
|
|
|
|
|
|
|
|
$query =~ s/user=/user=dwho/; |
|
|
|
|
$query =~ s/password=/password=dwho/; |
|
|
|
|