mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-05 09:41:40 +09:00
parent
bfce45e611
commit
9d75690e2d
1 changed files with 7 additions and 1 deletions
|
|
@ -372,12 +372,18 @@ class ModuleHandler extends Handler
|
|||
// check CSRF for non-GET (POST, PUT, etc.) actions
|
||||
if(Context::getRequestMethod() !== 'GET' && Context::isInstalled())
|
||||
{
|
||||
if($xml_info->action->{$this->act} && $xml_info->action->{$this->act}->check_csrf !== 'false' && !checkCSRF())
|
||||
if(isset($xml_info->action->{$this->act}) && $xml_info->action->{$this->act}->check_csrf !== 'false' && !checkCSRF())
|
||||
{
|
||||
return self::_createErrorMessage(-1, 'msg_security_violation');
|
||||
}
|
||||
}
|
||||
|
||||
// check if the current action allows standalone access (without mid)
|
||||
if(!$this->mid && isset($xml_info->action->{$this->act}) && $xml_info->action->{$this->act}->standalone === 'false')
|
||||
{
|
||||
return self::_createErrorMessage(-1, 'msg_invalid_request');
|
||||
}
|
||||
|
||||
if(!isset($this->module_info->use_mobile))
|
||||
{
|
||||
$this->module_info->use_mobile = 'N';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue