aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2008-09-18 14:17:08 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2008-09-18 14:17:08 +0000
commitcd1aad477992a3816be285143a40e257be5b638c (patch)
treec6eb6282a2f44ba377ce8a5a1d970cf3350f0e45
parent615188cd06a1d18de7097f34fff562aac1f3d1fc (diff)
downloadforums-cd1aad477992a3816be285143a40e257be5b638c.tar
forums-cd1aad477992a3816be285143a40e257be5b638c.tar.gz
forums-cd1aad477992a3816be285143a40e257be5b638c.tar.bz2
forums-cd1aad477992a3816be285143a40e257be5b638c.tar.xz
forums-cd1aad477992a3816be285143a40e257be5b638c.zip
Set secure cookie for style switcher if required. (Bug #19625)
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8874 89ea8834-ac86-4346-8a33-228a782c2dd0
-rw-r--r--phpBB/docs/CHANGELOG.html1
-rw-r--r--phpBB/includes/functions.php6
-rw-r--r--phpBB/styles/prosilver/template/overall_header.html1
-rw-r--r--phpBB/styles/prosilver/template/styleswitcher.js2
4 files changed, 7 insertions, 3 deletions
diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html
index 27a449e2aa..add2b9505a 100644
--- a/phpBB/docs/CHANGELOG.html
+++ b/phpBB/docs/CHANGELOG.html
@@ -115,6 +115,7 @@
<li>[Fix] Use correct port delimiter for MSSQL connections in windows. (Bug #16615)</li>
<li>[Fix] Do not allow setting forums parent to the forum itself. (Bug #18855)</li>
<li>[Fix] Display assigned rank/avatar for guests. (Bug #19155)</li>
+ <li>[Fix] Set secure cookie for style switcher if required. (Bug #19625)</li>
<li>[Change] No longer allow the direct use of MULTI_INSERT in sql_build_array. sql_multi_insert() must be used.</li>
<li>[Change] Display warning in ACP if config.php file is left writable.</li>
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index a68ada3540..3f269cfc2a 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -3717,8 +3717,10 @@ function page_header($page_title = '', $display_online_list = true)
'T_STYLESHEET_LINK' => (!$user->theme['theme_storedb']) ? "{$phpbb_root_path}styles/" . $user->theme['theme_path'] . '/theme/stylesheet.css' : "{$phpbb_root_path}style.$phpEx?sid=$user->session_id&amp;id=" . $user->theme['style_id'] . '&amp;lang=' . $user->data['user_lang'],
'T_STYLESHEET_NAME' => $user->theme['theme_name'],
- 'SITE_LOGO_IMG' => $user->img('site_logo'))
- );
+ 'SITE_LOGO_IMG' => $user->img('site_logo'),
+
+ 'A_COOKIE_SETTINGS' => addslashes('; path=' . $config['cookie_path'] . ((!$config['cookie_domain'] || $config['cookie_domain'] == 'localhost' || $config['cookie_domain'] == '127.0.0.1') ? '' : '; domain=' . $config['cookie_domain']) . ((!$config['cookie_secure']) ? '' : '; secure')),
+ ));
// application/xhtml+xml not used because of IE
header('Content-type: text/html; charset=UTF-8');
diff --git a/phpBB/styles/prosilver/template/overall_header.html b/phpBB/styles/prosilver/template/overall_header.html
index c0cb7640eb..21d536d4b3 100644
--- a/phpBB/styles/prosilver/template/overall_header.html
+++ b/phpBB/styles/prosilver/template/overall_header.html
@@ -32,6 +32,7 @@
var per_page = '{PER_PAGE}';
var base_url = '{A_BASE_URL}';
var style_cookie = 'phpBBstyle';
+ var style_cookie_settings = '{A_COOKIE_SETTINGS}';
var onload_functions = new Array();
var onunload_functions = new Array();
diff --git a/phpBB/styles/prosilver/template/styleswitcher.js b/phpBB/styles/prosilver/template/styleswitcher.js
index c68215d13f..203d8e4c21 100644
--- a/phpBB/styles/prosilver/template/styleswitcher.js
+++ b/phpBB/styles/prosilver/template/styleswitcher.js
@@ -112,7 +112,7 @@ function createCookie(name, value, days)
expires = '';
}
- document.cookie = name + '=' + value + expires + '; path=/';
+ document.cookie = name + '=' + value + expires + style_cookie_settings;
}
function readCookie(name)