mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-02 01:52:10 +09:00
Add more error codes in critical code paths in Context and ModuleHandler
This commit is contained in:
parent
e4e252c1b4
commit
fd421c86fc
2 changed files with 11 additions and 1 deletions
|
|
@ -73,12 +73,14 @@ class ModuleHandler extends Handler
|
|||
if(!Context::get('logged_info')->isAdmin())
|
||||
{
|
||||
$this->error = 'msg_security_violation';
|
||||
$this->error_detail = $oContext->security_check_detail;
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case 'DENY ALL':
|
||||
default:
|
||||
$this->error = 'msg_security_violation';
|
||||
$this->error_detail = $oContext->security_check_detail;
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -138,6 +140,7 @@ class ModuleHandler extends Handler
|
|||
|
||||
case 'block':
|
||||
$this->error = 'The site does not exist';
|
||||
$this->error_detail = 'ERR_DOMAIN_NOT_FOUND';
|
||||
$this->httpStatusCode = 404;
|
||||
return true;
|
||||
|
||||
|
|
@ -1041,7 +1044,7 @@ class ModuleHandler extends Handler
|
|||
if($this->error)
|
||||
{
|
||||
// display content with message module instance
|
||||
$oMessageObject = self::_createErrorMessage(-1, $this->error, $this->httpStatusCode, '', $oModule->get('rx_error_location'));
|
||||
$oMessageObject = self::_createErrorMessage(-1, $this->error, $this->httpStatusCode, $this->error_detail, $oModule->get('rx_error_location'));
|
||||
|
||||
// display Error Page
|
||||
if(!in_array($oMessageObject->getHttpStatusCode(), array(200, 403)))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue