aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArno Richter <oelna@oelna.de>2023-01-13 17:45:27 +0100
committerArno Richter <oelna@oelna.de>2023-01-13 17:46:43 +0100
commit3ebd3dcfe6b564ddfe5dcbc0ff9f2bb1fa92c761 (patch)
treeed51a9041ae8def4a4a03fb0d8a06c4745a2ce4d
parentb20cf03c18ad06a5d9df4fa7bc61734fc57ba41b (diff)
downloadmicroblog-3ebd3dcfe6b564ddfe5dcbc0ff9f2bb1fa92c761.tar.gz
microblog-3ebd3dcfe6b564ddfe5dcbc0ff9f2bb1fa92c761.tar.bz2
microblog-3ebd3dcfe6b564ddfe5dcbc0ff9f2bb1fa92c761.zip
prepare use of private key files for signing in activitypub. fix small cookie issue in functions.php
-rw-r--r--.gitignore1
-rw-r--r--.htaccess5
-rw-r--r--lib/functions.php2
3 files changed, 6 insertions, 2 deletions
diff --git a/.gitignore b/.gitignore
index 1dd4d73..abf17d6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,4 +3,5 @@ config.php
feed.*
feeds/
files/
+keys/
log.txt
diff --git a/.htaccess b/.htaccess
index 66aa61a..11ad211 100644
--- a/.htaccess
+++ b/.htaccess
@@ -14,9 +14,12 @@ AddType application/json .json
</IfModule>
</Files>
+# deny access to key files
+RedirectMatch 403 ^/keys/.*$
+
<IfModule mod_rewrite.c>
RewriteEngine On
-RewriteBase /microblog
+RewriteBase /
# friendly URLs
RewriteRule ^feed/json/?$ feed/feed.json [L]
diff --git a/lib/functions.php b/lib/functions.php
index 3f69b56..c5990f1 100644
--- a/lib/functions.php
+++ b/lib/functions.php
@@ -19,7 +19,7 @@ function check_login() {
} else {
// invalid cookie data
unset($_COOKIE['microblog_login']);
- setcookie('microblog_login', '', time()-3600, '/', $domain, false);
+ setcookie('microblog_login', '', time()-3600, '/', false, false);
}
}