summaryrefslogtreecommitdiff
path: root/backend.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2013-04-11 21:39:54 +0400
committerAndrew Dolgov <[email protected]>2013-04-11 21:39:54 +0400
commitccfa90803bd094a4eaa8959a9bd9c2d775b7788c (patch)
tree7cd3613c694d06e3c73d8732213c7245470d0f53 /backend.php
parentb229a1845693e2d6210d431a852462e8c274061a (diff)
backend: add session validation check
Diffstat (limited to 'backend.php')
-rw-r--r--backend.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/backend.php b/backend.php
index 9eb3989e4..6ee0e081f 100644
--- a/backend.php
+++ b/backend.php
@@ -62,6 +62,11 @@
}
if ($_SESSION["uid"]) {
+ if (!validate_session($link)) {
+ header("Content-Type: text/json");
+ print json_encode(array("error" => array("code" => 6)));
+ return;
+ }
load_user_plugins($link, $_SESSION["uid"]);
}