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/incubator-ponymail.git


The following commit(s) were added to refs/heads/master by this push:
     new 17ddb85  cluster generator does *not* include the lid in the hash
17ddb85 is described below

commit 17ddb850b84995cd7150b27966891a646b744351
Author: Sebb <s...@apache.org>
AuthorDate: Tue Mar 6 00:53:25 2018 +0000

    cluster generator does *not* include the lid in the hash
---
 tools/generators.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tools/generators.py b/tools/generators.py
index 63cc85e..d25f126 100644
--- a/tools/generators.py
+++ b/tools/generators.py
@@ -95,6 +95,8 @@ def medium(msg, body, lid, attachments):
 # This is the recommended generator for cluster setups.
 # Unlike 'medium', this only makes use of the Date: header and not the 
archived-at,
 # as the archived-at may change from node to node (and will change if not in 
the raw mbox file)
+# Also the lid is not included in the hash, so the hash does not change if the 
lid is overridden
+#
 def cluster(msg, body, lid, attachments):
     """
     Use data that is guaranteed to be the same across cluster setups
@@ -104,7 +106,6 @@ def cluster(msg, body, lid, attachments):
     The following message fields are concatenated to form the hash input:
     - body as is if bytes else encoded ascii, ignoring invalid characters; if 
the body is null it is treated as an empty string
       (currently trailing whitespace is dropped)
-    - lid
     - Message-ID (if present)
     - Date header converted to YYYY/MM/DD HH:MM:SS (UTC)
       or "(null)" if the date does not exist or cannot be converted
@@ -112,6 +113,8 @@ def cluster(msg, body, lid, attachments):
     - subject, encoded as ascii (if the field exists)
     - the hashes of any attachments
 
+    Note: the lid is not included in the hash.
+    
     Parameters:
     msg - the parsed message
     body - the parsed text content

-- 
To stop receiving notification emails like this one, please contact
s...@apache.org.

Reply via email to