Skip to content
Snippets Groups Projects
Commit e1114bea authored by Dries Buytaert's avatar Dries Buytaert
Browse files

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

parent 23e36f7b
Branches
Tags
Loading
......@@ -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) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment