Scandal
Well-known member
Well, if an acccount is banned and I'm trying to make an ajax request to a controller via that account, I get the ban message as return data, instead of the data, the controller trying to give as output.
With some research on the XF2 core, I found that the "stop" message is applied via the class \XF\Pub\Controller\AbstractContoller and method:
Is there a way to bypass that method / or prevent it from applying the stop message, for example, if the $ajaxaction has a specific value?
Maybe with a Listener? I'm not 100% sure how to apply it.
With some research on the XF2 core, I found that the "stop" message is applied via the class \XF\Pub\Controller\AbstractContoller and method:
PHP:
public function assertNotBanned()
{
if (\XF::visitor()->is_banned)
{
throw $this->exception(
$this->plugin('XF:Error')->actionBanned()
);
}
}
Is there a way to bypass that method / or prevent it from applying the stop message, for example, if the $ajaxaction has a specific value?
PHP:
$ajaxaction = $this->filter('act', 'str');
Maybe with a Listener? I'm not 100% sure how to apply it.