FIX: Strip null bytes in mail subjects.

This commit is contained in:
Guo Xiang Tan
2018-10-11 09:46:32 +08:00
parent ffc241eb25
commit 5039a6c3f1
3 changed files with 23 additions and 1 deletions

View File

@@ -117,6 +117,12 @@ describe Email::Receiver do
expect(IncomingEmail.last.error).to eq("RuntimeError")
end
it "strips null bytes from the subject" do
expect do
process(:null_byte_in_subject)
end.to raise_error(Email::Receiver::BadDestinationAddress)
end
context "bounces to VERP" do
let(:bounce_key) { "14b08c855160d67f2e0c2f8ef36e251e" }