Skip to content
Snippets Groups Projects
Commit 4afcf635 authored by Andrew Dolgov's avatar Andrew Dolgov
Browse files

api host: add session validation

parent 5d97019d
No related branches found
No related tags found
No related merge requests found
...@@ -58,6 +58,16 @@ ...@@ -58,6 +58,16 @@
if (!init_plugins()) return; if (!init_plugins()) return;
if ($_SESSION["uid"]) { if ($_SESSION["uid"]) {
if (!validate_session()) {
header("Content-Type: text/json");
print json_encode(array("seq" => -1,
"status" => 1,
"content" => array("error" => "NOT_LOGGED_IN")));
return;
}
load_user_plugins( $_SESSION["uid"]); load_user_plugins( $_SESSION["uid"]);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment