Merge branch 'hotfix/5.5.7'
This commit is contained in:
@@ -33,14 +33,18 @@ class Output
|
||||
{
|
||||
private $slim;
|
||||
|
||||
protected $errorDesc = array(
|
||||
protected $errorDesc = [
|
||||
400 => 'Bad Request',
|
||||
401 => 'Unauthorized',
|
||||
403 => 'Forbidden',
|
||||
404 => 'Page Not Found',
|
||||
409 => 'Conflict',
|
||||
500 => 'Internal Server Error',
|
||||
);
|
||||
];
|
||||
|
||||
protected $allowedStatusCodeList = [
|
||||
200, 400, 401, 403, 404, 409, 500
|
||||
];
|
||||
|
||||
protected $ignorePrintXStatusReasonExceptionClassNameList = [
|
||||
'PDOException'
|
||||
@@ -104,6 +108,11 @@ class Output
|
||||
if ($exception && in_array(get_class($exception), $this->ignorePrintXStatusReasonExceptionClassNameList)) {
|
||||
$toPrintXStatusReason = false;
|
||||
}
|
||||
|
||||
if (!in_array($statusCode, $this->allowedStatusCodeList)) {
|
||||
$statusCode = 500;
|
||||
}
|
||||
|
||||
$this->getSlim()->response()->setStatus($statusCode);
|
||||
if ($toPrintXStatusReason) {
|
||||
$this->getSlim()->response()->headers->set('X-Status-Reason', $text);
|
||||
|
||||
@@ -67,6 +67,8 @@
|
||||
},
|
||||
"layoutDetailDisabled": true,
|
||||
"layoutMassUpdateDisabled": true,
|
||||
"importDisabled": true,
|
||||
"exportDisabled": true,
|
||||
"where": {
|
||||
"=": {
|
||||
"leftJoins": ["users", "contacts", "leads"],
|
||||
|
||||
@@ -211,6 +211,7 @@
|
||||
"notStorable": true,
|
||||
"layoutListDisabled": true,
|
||||
"layoutDetailDisabled": true,
|
||||
"importDisabled": true,
|
||||
"layoutMassUpdateDisabled": true,
|
||||
"exportDisabled": true,
|
||||
"view": "crm:views/lead/fields/acceptance-status",
|
||||
@@ -223,6 +224,7 @@
|
||||
"layoutListDisabled": true,
|
||||
"layoutDetailDisabled": true,
|
||||
"layoutMassUpdateDisabled": true,
|
||||
"importDisabled": true,
|
||||
"exportDisabled": true,
|
||||
"view": "crm:views/lead/fields/acceptance-status",
|
||||
"link": "calls",
|
||||
|
||||
@@ -137,6 +137,7 @@
|
||||
"layoutListDisabled": true,
|
||||
"layoutDetailDisabled": true,
|
||||
"layoutMassUpdateDisabled": true,
|
||||
"importDisabled": true,
|
||||
"exportDisabled": true,
|
||||
"view": "crm:views/lead/fields/acceptance-status",
|
||||
"link": "meetings",
|
||||
@@ -148,6 +149,7 @@
|
||||
"layoutListDisabled": true,
|
||||
"layoutDetailDisabled": true,
|
||||
"layoutMassUpdateDisabled": true,
|
||||
"importDisabled": true,
|
||||
"exportDisabled": true,
|
||||
"view": "crm:views/lead/fields/acceptance-status",
|
||||
"link": "calls",
|
||||
|
||||
@@ -71,6 +71,8 @@
|
||||
},
|
||||
"layoutDetailDisabled": true,
|
||||
"layoutMassUpdateDisabled": true,
|
||||
"importDisabled": true,
|
||||
"exportDisabled": true,
|
||||
"where": {
|
||||
"=": {
|
||||
"leftJoins": ["users", "contacts", "leads"],
|
||||
|
||||
@@ -182,6 +182,7 @@
|
||||
"layoutListDisabled": true,
|
||||
"layoutDetailDisabled": true,
|
||||
"layoutMassUpdateDisabled": true,
|
||||
"importDisabled": true,
|
||||
"exportDisabled": true,
|
||||
"view": "crm:views/lead/fields/acceptance-status",
|
||||
"link": "meetings",
|
||||
@@ -193,6 +194,7 @@
|
||||
"layoutListDisabled": true,
|
||||
"layoutDetailDisabled": true,
|
||||
"layoutMassUpdateDisabled": true,
|
||||
"importDisabled": true,
|
||||
"exportDisabled": true,
|
||||
"view": "crm:views/lead/fields/acceptance-status",
|
||||
"link": "calls",
|
||||
|
||||
Reference in New Issue
Block a user