Skip to content

Commit

Permalink
excluding c4 as it is case sensitive
Browse files Browse the repository at this point in the history
  • Loading branch information
ptrpfn committed Sep 24, 2024
1 parent b3fa1d0 commit 91b00f3
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions ascmhl/hashlist_xml_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,14 +164,18 @@ def parse(file_path):
else:
# find right hash entry and set structure hash
entry = current_object.find_hash_entry_for_format(tag)
entry.structure_hash_string = (
element.text.lower()
) # lower() for improved robustness for uppercase hashes in manifests (which is actually covered in the spec unambiguously)

proper_hash_value = element.text
if tag != "c4":
# lower() for improved robustness for uppercase (non c4) hashes in manifests (which is actually covered in the spec unambiguously)
proper_hash_value = element.text.lower()
entry.structure_hash_string = proper_hash_value
else:
entry = MHLHashEntry(
tag, element.text.lower(), element.attrib.get("action"), hash_date
) # lower() for improved robustness for uppercase hashes in manifests (which is actually covered in the spec unambiguously)
proper_hash_value = element.text
if tag != "c4":
# lower() for improved robustness for uppercase (non c4) hashes in manifests (which is actually covered in the spec unambiguously)
proper_hash_value = element.text.lower()
entry = MHLHashEntry(tag, proper_hash_value, element.attrib.get("action"), hash_date)

current_object.append_hash_entry(entry)

elif tag == "hash" or tag == "directoryhash":
Expand Down

0 comments on commit 91b00f3

Please sign in to comment.