From fb247a0cf84411595bd8a7b3fdb486501ca5a615 Mon Sep 17 00:00:00 2001 From: jekuaitk Date: Fri, 29 Aug 2025 14:53:26 +0200 Subject: [PATCH 1/2] #195: Sanitize recipient identifier in Maestro notification --- modules/os2forms_forloeb/src/MaestroHelper.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/os2forms_forloeb/src/MaestroHelper.php b/modules/os2forms_forloeb/src/MaestroHelper.php index d2dd0c5..80f3748 100644 --- a/modules/os2forms_forloeb/src/MaestroHelper.php +++ b/modules/os2forms_forloeb/src/MaestroHelper.php @@ -389,7 +389,10 @@ private function sendNotificationDigitalPost( $senderLabel = $subject; $messageLabel = $subject; - $recipientLookupResult = $this->digitalPostHelper->lookupRecipient($recipient); + // Remove all non-digits from recipient identifier. + $recipientIdentifier = preg_replace('/[^\d]+/', '', $recipient); + + $recipientLookupResult = $this->digitalPostHelper->lookupRecipient($recipientIdentifier); $actions = [ (new Action()) ->setActionCode(SF1601::ACTION_SELVBETJENING) From 6e83da36ccef46813abb774dcbd2d19e15cc252c Mon Sep 17 00:00:00 2001 From: jekuaitk Date: Fri, 29 Aug 2025 14:58:52 +0200 Subject: [PATCH 2/2] #195: Updated CHANGELOG --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bbaf66e..150a4d7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,9 @@ before starting to add changes. Use example [placed in the end of the page](#exa ## [Unreleased] +- [PR-202](https://github.com/OS2Forms/os2forms/pull/202) + - Removed non-digits from recipient id in Maestro digital post notifications. + ## [4.1.0] 2025-06-03 - [PR-176](https://github.com/OS2Forms/os2forms/pull/176)