Skip to content

Commit a7f06b2

Browse files
fixup! fix: normalize email addresses before using them
Signed-off-by: SebastianKrupinski <[email protected]>
1 parent f05b5c8 commit a7f06b2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/BackgroundJob/RepairRecipients.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ protected function run($argument): void {
4444
foreach ($recipients as $recipient) {
4545
$id = $recipient['id'];
4646
$email = $recipient['email'];
47-
$email = trim(str_replace('\'', '', $email));
47+
$email = trim(str_replace('\'', '', (string)$email));
4848
$update->setParameter('id', $id, IQueryBuilder::PARAM_STR);
4949
$update->setParameter('email', $email, IQueryBuilder::PARAM_STR);
5050
$update->executeStatement();

lib/Service/PhishingDetection/PhishingDetectionService.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function checkHeadersForPhishing(Horde_Mime_Headers $headers, bool $hasHt
3333
$customEmail = null;
3434
$fromHeader = $headers->getHeader('From');
3535
if ($fromHeader instanceof Horde_Mime_Headers_Element_Address) {
36-
$firstAddr = AddressList::fromHorde($fromHeader->getAddressList(true), true)?->first();
36+
$firstAddr = AddressList::fromHorde($fromHeader->getAddressList(true), true)->first();
3737
$fromFN = $firstAddr?->getLabel();
3838
$fromEmail = $firstAddr?->getEmail();
3939
$customEmail = $firstAddr?->getCustomEmail();

0 commit comments

Comments
 (0)