Commit e1114bea authored by Dries's avatar Dries

- Patch #127753 by ChrisKennedy and GreenMother: regex error with session.cookie_domain settings.

parent 23e36f7b
......@@ -140,7 +140,7 @@
* We try to set the correct cookie domain.
*/
if (isset($_SERVER['HTTP_HOST'])) {
$domain = '.'. preg_replace('`^www.`', '', $_SERVER['HTTP_HOST']);
$domain = '.'. preg_replace('`^www\.`', '', $_SERVER['HTTP_HOST']);
// Per RFC 2109, cookie domains must contain at least one dot other than the
// first. For hosts such as 'localhost', we don't set a cookie domain.
if (count(explode('.', $domain)) > 2) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment