mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-08 03:01:43 +09:00
Add FeatureDisabled and SecurityViolation exception classes
This commit is contained in:
parent
88dc76501a
commit
10c8d11785
11 changed files with 33 additions and 29 deletions
|
|
@ -86,7 +86,7 @@ class ModuleHandler extends Handler
|
|||
if($isInvalid)
|
||||
{
|
||||
htmlHeader();
|
||||
echo lang("msg_invalid_request");
|
||||
echo lang('msg_security_violation');
|
||||
htmlFooter();
|
||||
Context::close();
|
||||
exit;
|
||||
|
|
@ -464,7 +464,7 @@ class ModuleHandler extends Handler
|
|||
|
||||
if(!in_array(strtoupper($_SERVER['REQUEST_METHOD']), $allowedMethodList))
|
||||
{
|
||||
$this->error = "msg_invalid_request";
|
||||
$this->error = 'msg_invalid_request';
|
||||
$oMessageObject = self::getModuleInstance('message', $display_mode);
|
||||
$oMessageObject->setError(-1);
|
||||
$oMessageObject->setMessage($this->error);
|
||||
|
|
@ -620,7 +620,7 @@ class ModuleHandler extends Handler
|
|||
|
||||
if(!in_array(strtoupper($_SERVER['REQUEST_METHOD']), $allowedMethodList))
|
||||
{
|
||||
$this->error = "msg_invalid_request";
|
||||
$this->error = 'msg_security_violation';
|
||||
$oMessageObject = self::getModuleInstance('message', $display_mode);
|
||||
$oMessageObject->setError(-1);
|
||||
$oMessageObject->setMessage($this->error);
|
||||
|
|
@ -635,7 +635,7 @@ class ModuleHandler extends Handler
|
|||
if($xml_info->action->{$this->act} && $xml_info->action->{$this->act}->check_csrf !== 'false' && !checkCSRF())
|
||||
{
|
||||
$this->_setInputErrorToContext();
|
||||
$this->error = 'msg_invalid_request';
|
||||
$this->error = 'msg_security_violation';
|
||||
$oMessageObject = ModuleHandler::getModuleInstance('message', $display_mode);
|
||||
$oMessageObject->setError(-1);
|
||||
$oMessageObject->setMessage($this->error);
|
||||
|
|
|
|||
|
|
@ -136,7 +136,7 @@ class ModuleObject extends BaseObject
|
|||
// Set privileges(granted) information
|
||||
if($this->setPrivileges() !== true)
|
||||
{
|
||||
$this->stop('msg_invalid_request');
|
||||
$this->stop('msg_not_permitted');
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue