Author: jfthomps
Date: Wed Oct 26 15:41:50 2011
New Revision: 1189273

URL: http://svn.apache.org/viewvc?rev=1189273&view=rev
Log:
VCL-487
Problem in screen transition after successful login authentication

applied patch submitted in JIRA issue by Toro Yokoyama

modified getAuthCookieData - added base64_encode to $cryptdata
modified readAuthCookie - added base64_decode to $cookie

Modified:
    incubator/vcl/trunk/web/.ht-inc/authentication.php

Modified: incubator/vcl/trunk/web/.ht-inc/authentication.php
URL: 
http://svn.apache.org/viewvc/incubator/vcl/trunk/web/.ht-inc/authentication.php?rev=1189273&r1=1189272&r2=1189273&view=diff
==============================================================================
--- incubator/vcl/trunk/web/.ht-inc/authentication.php (original)
+++ incubator/vcl/trunk/web/.ht-inc/authentication.php Wed Oct 26 15:41:50 2011
@@ -51,6 +51,8 @@ function getAuthCookieData($loginid, $va
        if(! openssl_private_encrypt($cdata, $cryptdata, $keys["private"]))
                return "Failed to encrypt cookie data";
 
+       $cryptdata = base64_encode($cryptdata);
+
        return array("data" => $cryptdata, "ts" => $ts);
 }
 
@@ -72,6 +74,7 @@ function readAuthCookie() {
                $cookie = stripslashes($_COOKIE["VCLAUTH"]);
        else
                $cookie = $_COOKIE["VCLAUTH"];
+       $cookie = base64_decode($cookie);
    if(! openssl_public_decrypt($cookie, $tmp, $keys['public'])) {
       $AUTHERROR["code"] = 3;
       $AUTHERROR["message"] = "Failed to decrypt auth cookie";


Reply via email to