This is an automated email from the ASF dual-hosted git repository.
sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git
The following commit(s) were added to refs/heads/master by this push:
new b17f3b0 Only search headers for the Message-ID
b17f3b0 is described below
commit b17f3b0bf4be51d5b000a2ce144ca7ff971c44ee
Author: Sebb <[email protected]>
AuthorDate: Tue Feb 12 09:47:07 2019 +0000
Only search headers for the Message-ID
---
tools/deliver.rb | 4 +++-
www/secretary/workbench/models/message.rb | 4 +++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/tools/deliver.rb b/tools/deliver.rb
index 7a76405..d1dfe8f 100644
--- a/tools/deliver.rb
+++ b/tools/deliver.rb
@@ -8,7 +8,9 @@ require 'fileutils'
MAIL_ROOT = '/srv/mail'
# get the message ID
-def self.getmid(hdrs)
+def self.getmid(message)
+ # only search headers for MID
+ hdrs = message[/\A(.*?)\r?\n\r?\n/m, 1] || ''
mid = hdrs[/^Message-ID:.*/i]
if mid =~ /^Message-ID:\s*$/i # no mid on the first line
# capture the next line and join them together
diff --git a/www/secretary/workbench/models/message.rb
b/www/secretary/workbench/models/message.rb
index 34682ae..ff02dd2 100644
--- a/www/secretary/workbench/models/message.rb
+++ b/www/secretary/workbench/models/message.rb
@@ -311,7 +311,9 @@ class Message
end
# get the message ID
- def self.getmid(hdrs)
+ def self.getmid(message)
+ # only search headers for MID
+ hdrs = message[/\A(.*?)\r?\n\r?\n/m, 1] || ''
mid = hdrs[/^Message-ID:.*/i]
if mid =~ /^Message-ID:\s*$/i # no mid on the first line
# capture the next line and join them together