Verify Mouse version with Apache (#1452)

environments/ppa-mbqj77/deployments/46
Xavier Guimard 7 years ago
parent 5bfdeb6b43
commit a7329c1dcc
  1. 7
      lemonldap-ng-common/lib/Lemonldap/NG/Common/Session.pm
  2. 7
      lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Main/Jail.pm
  3. 9
      lemonldap-ng-portal/t/70-2F-TOTP-and-HISTORY.t

@ -13,11 +13,8 @@ use Lemonldap::NG::Common::Apache::Session;
# Workaround for another ModPerl/Mouse issue...
BEGIN {
require Mouse;
my $v = $Mouse::VERSION;
$v =~ s/^v//;
if ( $v =~ /^2\.(?:1|2|3|4)/
and $INC{'Lemonldap/NG/Handler/Apache2/Main.pm'} )
{
my $v = sprintf( "%d.%03d%03d", ( $Mouse::VERSION =~ /(\d+)/g ) );
if ( $v < 2.005001 and $Lemonldap::NG::Handler::Apache2::Main::VERSION ) {
require Moose;
Moose->import();
}

@ -8,11 +8,8 @@ use Lemonldap::NG::Common::Safelib; #link protected safe Safe object
# Workaround for another ModPerl/Mouse issue...
BEGIN {
require Mouse;
my $v = $Mouse::VERSION;
$v =~ s/^v//;
if ( $v =~ /^2\.(?:1|2|3|4)/
and $INC{'Lemonldap/NG/Handler/Apache2/Main.pm'} )
{
my $v = sprintf( "%d.%03d%03d", ( $Mouse::VERSION =~ /(\d+)/g ) );
if ( $v < 2.005001 and $Lemonldap::NG::Handler::Apache2::Main::VERSION ) {
require Moose;
Moose->import();
}

@ -15,12 +15,12 @@ SKIP: {
my $client = LLNG::Manager::Test->new(
{
ini => {
logLevel => 'debug',
logLevel => 'error',
totp2fSelfRegistration => 1,
totp2fActivation => 1,
loginHistoryEnabled => 1,
authentication => 'Demo',
userDB => 'Same',
authentication => 'Demo',
userDB => 'Same',
}
}
);
@ -120,10 +120,9 @@ SKIP: {
'Post code'
);
expectOK($res);
$id = expectCookie($res);
ok( $res->[2]->[0] =~ /trspan="lastLogins"/, 'History found' )
or explain( $res->[2]->[0], 'trspan="noHistory"' );
my @c = ( $res->[2]->[0] =~ /<td>127.0.0.1/gs );

Loading…
Cancel
Save