Fix API request

This commit is contained in:
iBNu Maksum
2025-03-11 14:39:05 +07:00
parent e3c173bea4
commit d7bbb4d18f
4 changed files with 38 additions and 12 deletions

View File

@ -22,8 +22,8 @@ class Csrf
public static function check($token)
{
global $config;
if($config['csrf_enabled'] == 'yes') {
global $config, $isApi;
if($config['csrf_enabled'] == 'yes' && !$isApi) {
if (isset($_SESSION['csrf_token'], $_SESSION['csrf_token_time'], $token)) {
$storedToken = $_SESSION['csrf_token'];
$tokenTime = $_SESSION['csrf_token_time'];