X-Git-Url: https://git.wh0rd.org/?a=blobdiff_plain;f=backend.php;h=b583d379e46fbbe726655adbfe7698ecb10a7027;hb=404e2e3603c852a3f82a21c14b8888005e2b3f99;hp=41481a9635f59dbd21f78bc062f1db894ce3bfa2;hpb=1ebf3b979ecb697285edd3bec284290bd305647d;p=tt-rss.git diff --git a/backend.php b/backend.php index 41481a96..b583d379 100644 --- a/backend.php +++ b/backend.php @@ -37,21 +37,20 @@ @$csrf_token = $_REQUEST['csrf_token']; + require_once "autoload.php"; require_once "sessions.php"; require_once "functions.php"; require_once "config.php"; require_once "db.php"; require_once "db-prefs.php"; - no_cache_incantation(); - startup_gettext(); $script_started = microtime(true); $link = db_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME); - if (!init_connection($link)) return; + if (!init_plugins($link)) return; header("Content-Type: text/json; charset=utf-8"); @@ -64,6 +63,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"]); }