مراية لـ
https://github.com/postalserver/postal.git
تم المزامنة 2025-11-30 21:32:30 +00:00
fix: update raw headers after changing messages to during parsing
Previously, headers were not updated but the mail gem parsing may decide to change the transfer encoding. If it does this, the body is updated to the new format but the header is not, this results in a mismatch when the message it sent onwards and the client being unable render the message. The specific situation identified was changing an HTML-only e-mail from quoted-printable to 7bit. closes #2816
هذا الالتزام موجود في:
@@ -535,7 +535,9 @@ module Postal
|
||||
if parse_result.actioned?
|
||||
# Somethign was changed, update the raw message
|
||||
@database.update(raw_table, { data: parse_result.new_body }, where: { id: raw_body_id })
|
||||
@database.update(raw_table, { data: parse_result.new_headers }, where: { id: raw_headers_id })
|
||||
@raw = parse_result.new_body
|
||||
@raw_headers = parse_result.new_headers
|
||||
@raw_message = nil
|
||||
end
|
||||
update("parsed" => 1, "tracked_links" => parse_result.tracked_links, "tracked_images" => parse_result.tracked_images)
|
||||
|
||||
@@ -14,7 +14,7 @@ module Postal
|
||||
|
||||
return unless @domain
|
||||
|
||||
@parsed_output = generate
|
||||
@parsed_output = generate.split("\r\n\r\n", 2)
|
||||
end
|
||||
|
||||
attr_reader :tracked_links
|
||||
@@ -25,7 +25,11 @@ module Postal
|
||||
end
|
||||
|
||||
def new_body
|
||||
@parsed_output.split("\r\n\r\n", 2)[1]
|
||||
@parsed_output[1]
|
||||
end
|
||||
|
||||
def new_headers
|
||||
@parsed_output[0]
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
المرجع في مشكلة جديدة
حظر مستخدم