issue-3221.patch
lib/controller/opMobileFrontWebController.class.php | ||
---|---|---|
53 | 53 |
$url = substr($url, 0, $fragPos); |
54 | 54 |
} |
55 | 55 | |
56 |
if (strpos($url, '?') === false) |
|
56 |
$endPos = strlen($url) - 1; |
|
57 |
$qPos = strrpos($url, '?'); |
|
58 |
$aPos = strrpos($url, '&'); |
|
59 |
if ($qPos === false) |
|
57 | 60 |
{ |
58 | 61 |
$url .= '?'; |
59 | 62 |
} |
63 |
// When URL string does not terminate in a question mark and the ampersand, and a question mark is not included. |
|
64 |
elseif ($qPos !== false && $qPos !== $endPos && $aPos !== $endPos) |
|
65 |
{ |
|
66 |
$url .= '&'; |
|
67 |
} |
|
68 | ||
60 | 69 |
$url .= SID.$fragment; |
61 | 70 |
} |
62 | 71 | |
... | ... | |
78 | 87 | |
79 | 88 |
if (!$this->context->getRequest()->isCookie()) |
80 | 89 |
{ |
81 |
$matchd = '/'.preg_quote(session_name(),'/').'=.*([&|#]?)/';
|
|
90 |
$matchd = '/'.preg_quote(session_name(),'/').'=[^&#]*([&#]?)/';
|
|
82 | 91 |
if (preg_match($matchd, $url)) |
83 | 92 |
{ |
84 | 93 |
$url = preg_replace($matchd, SID.'\1', $url); |