Removed isAJAX check [So buggy] (#675)

This commit is contained in:
Roman Kelesidis 2023-04-08 00:16:55 +07:00 committed by GitHub
commit 045297eb6d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 16 deletions

View file

@ -145,7 +145,6 @@ define('SEARCH_TYPE_TRACKER', 1);
// Ajax error codes // Ajax error codes
define('E_AJAX_GENERAL_ERROR', 1000); define('E_AJAX_GENERAL_ERROR', 1000);
define('E_AJAX_NEED_LOGIN', 1001); define('E_AJAX_NEED_LOGIN', 1001);
define('E_AJAX_NOT_REQUEST', 1002);
// Private messaging // Private messaging
define('PRIVMSGS_READ_MAIL', 0); define('PRIVMSGS_READ_MAIL', 0);

View file

@ -75,13 +75,10 @@ class Ajax
// Check that requested action is valid // Check that requested action is valid
$action = $this->action; $action = $this->action;
// Action params // Actions params array
$action_params = null; $action_params = null;
if (!IsHelper::isAJAX()) { // Actions check
$this->ajax_die('Not AJAX request', E_AJAX_NOT_REQUEST);
}
if (!$action) { if (!$action) {
$this->ajax_die('no action specified'); $this->ajax_die('no action specified');
} elseif (!$action_params =& $this->valid_actions[$action]) { } elseif (!$action_params =& $this->valid_actions[$action]) {

View file

@ -31,16 +31,6 @@ class IsHelper
return $_is_php[$version]; return $_is_php[$version];
} }
/**
* Return true if ajax request
*
* @return bool
*/
public static function isAJAX(): bool
{
return (!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest');
}
/** /**
* Return true if server have SSL * Return true if server have SSL
* *