summaryrefslogtreecommitdiff
path: root/classes/handler/public.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2020-09-15 16:59:11 +0300
committerAndrew Dolgov <[email protected]>2020-09-15 16:59:11 +0300
commit154417d80b9f1ffb9d5d9fcbe2e6ab1dd15159bd (patch)
tree184c060c78dadf9fc50b6512a74ec31789d67162 /classes/handler/public.php
parentcbcb10a272ef8c46360da301e1bbbd4979d6f106 (diff)
public/logout: require valid CSRF token
Diffstat (limited to 'classes/handler/public.php')
-rwxr-xr-xclasses/handler/public.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/classes/handler/public.php b/classes/handler/public.php
index e4199a95e..8b1ce7127 100755
--- a/classes/handler/public.php
+++ b/classes/handler/public.php
@@ -283,8 +283,10 @@ class Handler_Public extends Handler {
}
function logout() {
- logout_user();
- header("Location: index.php");
+ if ($_POST["csrf_token"] == $_SESSION["csrf_token"]) {
+ logout_user();
+ header("Location: index.php");
+ }
}
function share() {