aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
authorTristan Darricau <github@nicofuma.fr>2014-11-27 10:38:45 +0100
committerTristan Darricau <github@nicofuma.fr>2014-11-27 10:38:45 +0100
commitb54dbe0df6003264df7cbc64c15714e403dd1aa5 (patch)
tree28bc576cc2472d84424164decaa22dd5fcdb55bf /phpBB/includes
parentff9b541070372cf4758b0ef538daa33e150a1886 (diff)
parentb67b67f2dfc018031bbd96916b38f39b96ecc0c3 (diff)
downloadforums-b54dbe0df6003264df7cbc64c15714e403dd1aa5.tar
forums-b54dbe0df6003264df7cbc64c15714e403dd1aa5.tar.gz
forums-b54dbe0df6003264df7cbc64c15714e403dd1aa5.tar.bz2
forums-b54dbe0df6003264df7cbc64c15714e403dd1aa5.tar.xz
forums-b54dbe0df6003264df7cbc64c15714e403dd1aa5.zip
Merge pull request #3188 from marc1706/ticket/11613
[ticket/11613] Allow cookies for domains without dots * marc1706/ticket/11613: [ticket/11613] Allow cookies to work on netbios domains
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/session.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php
index a7bd3244ae..8b93ab762d 100644
--- a/phpBB/includes/session.php
+++ b/phpBB/includes/session.php
@@ -1049,7 +1049,7 @@ class session
$name_data = rawurlencode($config['cookie_name'] . '_' . $name) . '=' . rawurlencode($cookiedata);
$expire = gmdate('D, d-M-Y H:i:s \\G\\M\\T', $cookietime);
- $domain = (!$config['cookie_domain'] || $config['cookie_domain'] == 'localhost' || $config['cookie_domain'] == '127.0.0.1') ? '' : '; domain=' . $config['cookie_domain'];
+ $domain = (!$config['cookie_domain'] || $config['cookie_domain'] == '127.0.0.1' || strpos($config['cookie_domain'], '.') === false) ? '' : '; domain=' . $config['cookie_domain'];
header('Set-Cookie: ' . $name_data . (($cookietime) ? '; expires=' . $expire : '') . '; path=' . $config['cookie_path'] . $domain . ((!$config['cookie_secure']) ? '' : '; secure') . '; HttpOnly', false);
}