From 573c505280c82a2f7fbf8869c5c16249f92d3fdc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Jaussoin?= Date: Thu, 13 Feb 2025 10:18:03 +0100 Subject: [PATCH] Fix FLEXIAPI-268 Allow pn-param in Apple format for the push notifications endpoints --- CHANGELOG.md | 1 + flexiapi/app/Rules/PnParam.php | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 49fc6d5..00af4c2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ v1.6 - Fix FLEXIAPI-254 Allow no data on POST requests to not trigger the ValidateJSON middleware - Fix FLEXIAPI-262 Bypass the JWT auth if we have an API Key - Fix FLEXIAPI-264 Add -k|api_key_ip parameter to accounts:create-admin-account to set/clear the related API Key restriction +- Fix FLEXIAPI-268 Allow pn-param in Apple format for the push notifications endpoints v1.5 --- diff --git a/flexiapi/app/Rules/PnParam.php b/flexiapi/app/Rules/PnParam.php index 10a3539..5cd40fb 100644 --- a/flexiapi/app/Rules/PnParam.php +++ b/flexiapi/app/Rules/PnParam.php @@ -9,11 +9,11 @@ class PnParam implements Rule { public function passes($attribute, $value) { - return $value == null || Validator::regex('/^\w+$/')->validate($value); + return $value == null || Validator::regex('/^[\w\.]+$/')->validate($value); } public function message() { - return 'The :attribute should be null or contain only alphanumeric and underscore characters'; + return 'The :attribute should be null or contain only alphanumeric, dots and underscore characters'; } }