aboutsummaryrefslogtreecommitdiff
path: root/timeline.inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'timeline.inc.php')
-rw-r--r--timeline.inc.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/timeline.inc.php b/timeline.inc.php
index 3b0581f..5932aa7 100644
--- a/timeline.inc.php
+++ b/timeline.inc.php
@@ -5,7 +5,8 @@
// check user credentials
if(isset($_COOKIE['microblog_login']) && $_COOKIE['microblog_login'] === sha1($config['url'].$config['admin_pass'])) {
// correct auth data, extend cookie life
- setcookie('microblog_login', sha1($config['url'].$config['admin_pass']), NOW+$config['cookie_life']);
+ $domain = ($_SERVER['HTTP_HOST'] != 'localhost') ? $_SERVER['HTTP_HOST'] : false;
+ setcookie('microblog_login', sha1($config['url'].$config['admin_pass']), NOW+$config['cookie_life'], '/', $domain, false);
}
// pagination