Skip to content

Commit fb247a0

Browse files
committed
#195: Sanitize recipient identifier in Maestro notification
1 parent df6abdd commit fb247a0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

modules/os2forms_forloeb/src/MaestroHelper.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,10 @@ private function sendNotificationDigitalPost(
389389
$senderLabel = $subject;
390390
$messageLabel = $subject;
391391

392-
$recipientLookupResult = $this->digitalPostHelper->lookupRecipient($recipient);
392+
// Remove all non-digits from recipient identifier.
393+
$recipientIdentifier = preg_replace('/[^\d]+/', '', $recipient);
394+
395+
$recipientLookupResult = $this->digitalPostHelper->lookupRecipient($recipientIdentifier);
393396
$actions = [
394397
(new Action())
395398
->setActionCode(SF1601::ACTION_SELVBETJENING)

0 commit comments

Comments
 (0)