瀏覽代碼

backend: add session validation check

Andrew Dolgov 11 年之前
父節點
當前提交
ccfa90803b
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5 0
      backend.php

+ 5 - 0
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"]);
 	}