[Rt-commit] rt branch, 4.0/new-cookie-may-be-undef, created. rt-4.0.0-408-g350aa55

Ruslan Zakirov ruz at bestpractical.com
Sun May 22 14:08:44 EDT 2011


The branch, 4.0/new-cookie-may-be-undef has been created
        at  350aa5538eb4fc0e43c99083b4255d0294edc4a2 (commit)

- Log -----------------------------------------------------------------
commit 350aa5538eb4fc0e43c99083b4255d0294edc4a2
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Sun May 22 22:05:14 2011 +0400

    cookie's value must be defined, empty string is
    
    value and name are required in CGI::Cookie->new method, since
    CGI 3.51 method returns undef if those two are not defined.

diff --git a/lib/RT/Interface/Web.pm b/lib/RT/Interface/Web.pm
index 597f728..37c7904 100644
--- a/lib/RT/Interface/Web.pm
+++ b/lib/RT/Interface/Web.pm
@@ -725,7 +725,7 @@ sub InstantiateNewSession {
 sub SendSessionCookie {
     my $cookie = CGI::Cookie->new(
         -name   => _SessionCookieName(),
-        -value  => $HTML::Mason::Commands::session{_session_id},
+        -value  => $HTML::Mason::Commands::session{_session_id} || '',
         -path   => RT->Config->Get('WebPath'),
         -secure => ( RT->Config->Get('WebSecureCookies') ? 1 : 0 )
     );

-----------------------------------------------------------------------


More information about the Rt-commit mailing list