summaryrefslogtreecommitdiff
path: root/include/sessions.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2021-03-14 14:17:18 +0300
committerAndrew Dolgov <[email protected]>2021-03-14 14:17:18 +0300
commit1c9afba5f058adace5e005b51fc533882f9af0fa (patch)
tree99f4a228acf9f969d5411048c210338ba0fd126a /include/sessions.php
parent2b8b845abe7c13ecbb266613910484310cffe8e1 (diff)
* add CSRF protection to xhr requests
* force ORM to use SQLITE WAL * add .editorconfig * cleanup a few things
Diffstat (limited to 'include/sessions.php')
-rw-r--r--include/sessions.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/sessions.php b/include/sessions.php
index b39a983..b4d901b 100644
--- a/include/sessions.php
+++ b/include/sessions.php
@@ -35,6 +35,10 @@
setcookie(session_name(), '', time()-42000, '/');
}
+ if (isset($_COOKIE["epube_csrf_token"])) {
+ setcookie("epube_csrf_token", '', time()-42000, '/');
+ }
+
session_commit();
}
}