mirror of
https://github.com/espocrm/espocrm.git
synced 2026-06-27 22:46:04 +00:00
Additional check in where checker
This commit is contained in:
@@ -119,6 +119,10 @@ class Checker
|
||||
$forbidComplexExpressions = $params->forbidComplexExpressions();
|
||||
$checkWherePermission = $params->applyPermissionCheck();
|
||||
|
||||
if ($attribute && str_contains($attribute, '#')) {
|
||||
throw new Forbidden("Not allowed character in attribute.");
|
||||
}
|
||||
|
||||
if ($forbidComplexExpressions) {
|
||||
if (in_array($type, $this->subQueryTypeList)) {
|
||||
throw new Forbidden("Sub-queries are forbidden in where.");
|
||||
|
||||
@@ -463,6 +463,7 @@ class RecordService
|
||||
->create()
|
||||
->from(Attachment::ENTITY_TYPE)
|
||||
->withSearchParams($searchParams)
|
||||
->withComplexExpressionsForbidden()
|
||||
->buildQueryBuilder()
|
||||
->where(
|
||||
Condition::in(
|
||||
|
||||
Reference in New Issue
Block a user