Avoid some warnings (#595)

This commit is contained in:
Xavier Guimard 2016-05-23 19:28:32 +00:00
parent 15146bd03b
commit bb39433ad5
5 changed files with 3 additions and 7 deletions

View File

@ -354,7 +354,7 @@ sub goToPortal {
# @return Value of the cookie if found, 0 else
sub fetchId {
my $class = shift;
my $t = $class->header_in('Cookie');
my $t = $class->header_in('Cookie') or return 0;
my $vhost = $class->resolveAlias;
my $lookForHttpCookie = $class->tsv->{securedCookie} =~ /^(2|3)$/
&& !(

View File

@ -182,7 +182,6 @@ sub display {
MAIL_URL => $self->conf->{mailUrl},
REGISTER_URL => $self->conf->{registerUrl},
HIDDEN_INPUTS => $self->buildHiddenForm(),
LOGIN_INFO => $req->loginInfo(),
);
# Display captcha if it's enabled

View File

@ -396,6 +396,8 @@ sub buildCookie {
expires => $self->conf->{cookieExpiration},
);
if ( $self->conf->{securedCookie} >= 2 ) {
shift;
shift;
push @{ $req->respHeaders },
'Set-Cookie' => $self->cookie(
name => $self->conf->{cookieName} . "http",

View File

@ -315,7 +315,6 @@ sub _deleteSession {
path => "/",
secure => 0,
expires => '-1d',
@_,
) unless ($preserveCookie);
# Log

View File

@ -2,10 +2,6 @@ use Test::More;
use strict;
use IO::String;
BEGIN {
use_ok( 'Lemonldap::NG::Portal::Main::Constants', ':all' );
}
require 't/test-lib.pm';
init(