From 07036bf10657855cc7b59f7c978bb6ab0d2d065a Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Sat, 9 Jan 2010 11:49:13 +0100 Subject: [PATCH] Cookie-Base-Path richtig berechnen. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Commit 0c50616fb43bcf934101fadd488278c40317b586 hat den Cookie-Gültigkeits-Pfad leider inklusive des Scriptnamens gesetzt, wodurch nur noch Zugriff auf login.pl möglich war. --- SL/Form.pm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/SL/Form.pm b/SL/Form.pm index 5f0fcd756..d85fe54da 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -566,12 +566,17 @@ sub create_http_response { my $session_cookie; if (defined $main::auth) { + my $uri = $self->_get_request_uri; + my @segments = $uri->path_segments; + pop @segments; + $uri->path_segments(@segments); + my $session_cookie_value = $main::auth->get_session_id(); $session_cookie_value ||= 'NO_SESSION'; $session_cookie = $cgi->cookie('-name' => $main::auth->get_session_cookie_name(), '-value' => $session_cookie_value, - '-path' => $self->_get_request_uri->path, + '-path' => $uri->path, '-secure' => $ENV{HTTPS}); } -- 2.20.1