Merge pull request #9313 from nupplaphil/bug/9282-header

Remove whitespace before ":" of mail headers
2022.09-rc
Hypolite Petovan 2020-09-28 14:46:18 -04:00 zatwierdzone przez GitHub
commit d4d9c5a18e
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
2 zmienionych plików z 6 dodań i 6 usunięć

Wyświetl plik

@ -137,10 +137,10 @@ class Email implements IEmail
foreach ($this->additionalMailHeader as $name => $values) { foreach ($this->additionalMailHeader as $name => $values) {
if (is_array($values)) { if (is_array($values)) {
foreach ($values as $value) { foreach ($values as $value) {
$headerString .= "$name : $value\n"; $headerString .= "$name: $value\n";
} }
} else { } else {
$headerString .= "$name : $values\n"; $headerString .= "$name: $values\n";
} }
} }
return $headerString; return $headerString;

Wyświetl plik

@ -83,10 +83,10 @@ class EMailerTest extends MockedTest
$this->assertTrue($emailer->send($testEmail)); $this->assertTrue($emailer->send($testEmail));
$this->assertContains("X-Friendica-Host : friendica.local", EmailerSpy::$MAIL_DATA['headers']); $this->assertContains("X-Friendica-Host: friendica.local", EmailerSpy::$MAIL_DATA['headers']);
$this->assertContains("X-Friendica-Platform : Friendica", EmailerSpy::$MAIL_DATA['headers']); $this->assertContains("X-Friendica-Platform: Friendica", EmailerSpy::$MAIL_DATA['headers']);
$this->assertContains("List-ID : <notification.friendica.local>", EmailerSpy::$MAIL_DATA['headers']); $this->assertContains("List-ID: <notification.friendica.local>", EmailerSpy::$MAIL_DATA['headers']);
$this->assertContains("List-Archive : <http://friendica.local/notifications/system>", EmailerSpy::$MAIL_DATA['headers']); $this->assertContains("List-Archive: <http://friendica.local/notifications/system>", EmailerSpy::$MAIL_DATA['headers']);
$this->assertContains("Reply-To: Sender <sender@friendica.local>", EmailerSpy::$MAIL_DATA['headers']); $this->assertContains("Reply-To: Sender <sender@friendica.local>", EmailerSpy::$MAIL_DATA['headers']);
$this->assertContains("MIME-Version: 1.0", EmailerSpy::$MAIL_DATA['headers']); $this->assertContains("MIME-Version: 1.0", EmailerSpy::$MAIL_DATA['headers']);
// Base64 "Test Text" // Base64 "Test Text"