aboutsummaryrefslogtreecommitdiff
path: root/timeline.inc.php
diff options
context:
space:
mode:
authorArno Richter <mail@arnorichter.de>2022-01-26 22:54:31 +0100
committerArno Richter <mail@arnorichter.de>2022-01-26 22:54:31 +0100
commit92c6aa46e73615d433bbef223f35921e5bf12e19 (patch)
treeecbc2d7ec79f67c539e6d3f78cf8019ae8b0425a /timeline.inc.php
parent8ed87afb6aa52e6398ade891ca07fdcc4b15525c (diff)
downloadmicroblog-92c6aa46e73615d433bbef223f35921e5bf12e19.tar.gz
microblog-92c6aa46e73615d433bbef223f35921e5bf12e19.tar.bz2
microblog-92c6aa46e73615d433bbef223f35921e5bf12e19.zip
Fix #3 by cleaning up a few localhost issues
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