Commit bb39433a authored by Yadd's avatar Yadd
Browse files

Avoid some warnings (#595)

parent 15146bd0
......@@ -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)$/
&& !(
......
......@@ -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
......
......@@ -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",
......
......@@ -315,7 +315,6 @@ sub _deleteSession {
path => "/",
secure => 0,
expires => '-1d',
@_,
) unless ($preserveCookie);
# Log
......
......@@ -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(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment