Global: Fix reloadloop if the server checks for CSRF token

This commit is contained in:
veselcraft 2022-01-22 16:12:01 +03:00
parent 2e0f51eb80
commit 89b75825b3
No known key found for this signature in database
GPG key ID: AED66BC1AC628A4E

View file

@ -75,8 +75,8 @@ final class InternalAPIPresenter extends OpenVKPresenter
exit("ты дебил это метод апи");
$sessionOffset = Session::i()->get("_timezoneOffset");
if(is_numeric($this->postParam("timezone"))) {
$postTZ = intval($this->postParam("timezone"));
if(is_numeric($this->postParam("timezone", false))) {
$postTZ = intval($this->postParam("timezone", false));
if ($postTZ != $sessionOffset || $sessionOffset == null) {
Session::i()->set("_timezoneOffset", $postTZ ? $postTZ : 3 * MINUTE );
$this->returnJson([