From 849c2819121317c23a3e53011c401732fa01e670 Mon Sep 17 00:00:00 2001 From: Bernd Bestel Date: Wed, 22 Sep 2021 10:12:57 +0200 Subject: [PATCH] Allow spaces in API filter values (fixes #1624) --- changelog/64_UNRELEASED_xxxx.xx.xx.md | 2 +- controllers/BaseApiController.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/changelog/64_UNRELEASED_xxxx.xx.xx.md b/changelog/64_UNRELEASED_xxxx.xx.xx.md index 0fcbeb1e..ee4ef359 100644 --- a/changelog/64_UNRELEASED_xxxx.xx.xx.md +++ b/changelog/64_UNRELEASED_xxxx.xx.xx.md @@ -5,4 +5,4 @@ - A product picture can now be added when creating a product (was currently only possible when editing a product) ### API -- Fixed that international characters were not allowed in API query filters +- Fixed that international characters and spaces were not allowed in API query filters diff --git a/controllers/BaseApiController.php b/controllers/BaseApiController.php index 6b249e24..0943835a 100644 --- a/controllers/BaseApiController.php +++ b/controllers/BaseApiController.php @@ -10,7 +10,7 @@ class BaseApiController extends BaseController const PATTERN_OPERATOR = '!?(=|~|<|>|(>=)|(<=)|(ยง))'; - const PATTERN_VALUE = '[A-Za-z\p{L}\p{M}*_0-9.$#^|-]+'; + const PATTERN_VALUE = '[A-Za-z\p{L}\p{M}*_0-9.$#^| -]+'; protected $OpenApiSpec = null;