Fixed bug #522887 - Using SSL -> cookies are unsecure

This commit is contained in:
Loïc Chapeaux
2002-02-26 21:18:17 +00:00
parent e7f9a03309
commit b5d7fc5cd8
3 changed files with 21 additions and 9 deletions

View File

@@ -8,10 +8,12 @@
require('./libraries/grab_globals.lib.php3');
require('./libraries/common.lib.php3');
// Puts the language to use in a cookie that will expire in 30 days
if (!isset($cookiePath)) {
$cookiePath = substr($SCRIPT_NAME, 0, strrpos($SCRIPT_NAME, '/'));
if (!isset($pma_uri_parts)) {
$pma_uri_parts = parse_url($cfgPmaAbsoluteUri);
$cookie_path = substr($pma_uri_parts['path'], 0, strrpos($pma_uri_parts['path'], '/'));
$is_https = ($pma_uri_parts['scheme'] == 'https') ? 1 : 0;
}
setcookie('lang', $lang, time() + 60*60*24*30, $cookiePath);
setcookie('lang', $lang, time() + 60*60*24*30, $cookie_path, '', $is_https);
// Defines the "item" image depending on text direction
$item_img = 'images/item_' . $text_dir . '.gif';
// Handles some variables that may have been sent by the calling script