Skip to content

Commit

Permalink
Fixed Anonymous Name Cookie Issue when URL Routing Enabled (bug #823)
Browse files Browse the repository at this point in the history
  • Loading branch information
mystralkk committed Dec 1, 2017
1 parent 419e471 commit ba71400
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions system/classes/router.class.php
Expand Up @@ -86,10 +86,11 @@ private static function proxy($url)

// Add the current cookies. Otherwise, session will be lost.
foreach ($_COOKIE as $key => $value) {
$request->addCookie(
htmlspecialchars($key, ENT_QUOTES, 'utf-8'),
htmlspecialchars($value, ENT_QUOTES, 'utf-8')
);
try {
$request->addCookie(urlencode($key), urlencode($value));
} catch (HTTP_Request2_LogicException $e) {
COM_errorLog(__METHOD__ . ': invalid cookie detected. name = "' . $key . '" value = "' . $value . '"');
}
}

try {
Expand Down

0 comments on commit ba71400

Please sign in to comment.