[Git][reproducible-builds/diffoscope][master] 2 commits: Use SHA256 over MD5 when generating page names for the HTML directory...

Chris Lamb gitlab at salsa.debian.org
Tue May 19 10:24:29 UTC 2020



Chris Lamb pushed to branch master at Reproducible Builds / diffoscope


Commits:
3da921d0 by Chris Lamb at 2020-05-19T11:11:46+01:00
Use SHA256 over MD5 when generating page names for the HTML directory presenter. (Closes: reproducible-builds/diffoscope#124)

- - - - -
090934d3 by Chris Lamb at 2020-05-19T11:19:45+01:00
Correct "differences" typo in the ApkFile handler. (Closes: reproducible-builds/diffoscope#127)

- - - - -


2 changed files:

- diffoscope/comparators/apk.py
- diffoscope/presenters/html/html.py


Changes:

=====================================
diffoscope/comparators/apk.py
=====================================
@@ -221,7 +221,7 @@ class ApkFile(File):
 
         x = Difference.from_command(Apksigner, self.path, other.path)
         if x is not None:
-            difference.insert(0, x)
+            differences.insert(0, x)
 
         return differences
 


=====================================
diffoscope/presenters/html/html.py
=====================================
@@ -96,8 +96,8 @@ def send_and_exhaust(iterator, arg, default):
     return output
 
 
-def md5(s):
-    return hashlib.md5(s.encode('utf-8')).hexdigest()
+def sha256(s):
+    return hashlib.sha256(s.encode('utf-8')).hexdigest()
 
 
 def escape_anchor(val):
@@ -601,7 +601,7 @@ class HTMLSideBySidePresenter:
         self.new_unified_diff()
         rotation_params = None
         if ctx.directory:
-            mainname = md5(unified_diff)
+            mainname = sha256(unified_diff)
             rotation_params = ctx, mainname
 
         try:
@@ -743,7 +743,7 @@ class HTMLPresenter(Presenter):
         def process_node(node, score):
             path = score[3]
             diff_path = output_diff_path(path)
-            pagename = md5(diff_path)
+            pagename = sha256(diff_path)
             if diff_path:
                 logger.debug('html output for %s', diff_path)
 



View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/-/compare/0293f49a705f7252380cb513b3d980941a59e71e...090934d3271ffdb35ebf0369b781e26db0c79af3

-- 
View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/-/compare/0293f49a705f7252380cb513b3d980941a59e71e...090934d3271ffdb35ebf0369b781e26db0c79af3
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.reproducible-builds.org/pipermail/rb-commits/attachments/20200519/993605ec/attachment.htm>


More information about the rb-commits mailing list