diff --git a/changelog/62_UNRELEASED_xxxx-xx-xx.md b/changelog/62_UNRELEASED_xxxx-xx-xx.md index 362cf26a..5185c185 100644 --- a/changelog/62_UNRELEASED_xxxx-xx-xx.md +++ b/changelog/62_UNRELEASED_xxxx-xx-xx.md @@ -88,3 +88,4 @@ - Fixed that due soon products with `due_type` = "Expiration date" were missing in `due_products` of the `/stock/volatile` endpoint - Fixed that `PUT/DELETE /objects/{entity}/{objectId}` produced an internal server error when the given object id was invalid (now returns `400 Bad Request`) - Fixed that hyphens in filter values did not work +- Fixed that cyrillic letters were not allowed in filter values diff --git a/controllers/BaseApiController.php b/controllers/BaseApiController.php index 5eb34bd9..96a2d343 100644 --- a/controllers/BaseApiController.php +++ b/controllers/BaseApiController.php @@ -12,7 +12,7 @@ class BaseApiController extends BaseController const PATTERN_OPERATOR = '!?(=|~|<|>|(>=)|(<=)|(ยง))'; - const PATTERN_VALUE = '[A-Za-z_0-9.$#^|-]+'; + const PATTERN_VALUE = '[A-Za-z\x{0400}-\x{04FF}_0-9.$#^|-]+'; public function __construct(\DI\Container $container) { @@ -90,7 +90,7 @@ class BaseApiController extends BaseController preg_match( '/(?P' . self::PATTERN_FIELD . ')' . '(?P' . self::PATTERN_OPERATOR . ')' - . '(?P' . self::PATTERN_VALUE . ')/', + . '(?P' . self::PATTERN_VALUE . ')/u', $q, $matches );