check schema version on backend calls because session stuff does it anyway and it's already cached

This commit is contained in:
Andrew Dolgov 2021-02-28 17:46:36 +03:00
parent 1bb0d9b603
commit bf02afed45
1 changed files with 5 additions and 0 deletions

View File

@ -51,6 +51,11 @@
UserHelper::load_user_plugins($_SESSION["uid"]);
}
if (Config::get_schema_version() !== SCHEMA_VERSION) {
print Errors::to_json(Errors::E_SCHEMA_MISMATCH);
return;
}
$purge_intervals = array(
0 => __("Use default"),
-1 => __("Never purge"),