Skip to content

Commit a1931c1

Browse files
committed
Update pyarchivefile.py
1 parent 7b17529 commit a1931c1

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

pyarchivefile.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9553,7 +9553,7 @@ def ArchiveFileValidate(infile, fmttype="auto", filestart=0,
95539553
VerbosePrintOut(outfname)
95549554
VerbosePrintOut("Record Number " + str(il) + "; File ID " + str(fid) + "; iNode Number " + str(finode))
95559555

9556-
if(outfcs == infcs):
9556+
if(hmac.compare_digest(infcs, outfcs)):
95579557
if(verbose):
95589558
VerbosePrintOut("File Header Checksum Passed at offset " + str(outfhstart))
95599559
VerbosePrintOut("'" + outfcs + "' == " + "'" + infcs + "'")
@@ -9565,7 +9565,7 @@ def ArchiveFileValidate(infile, fmttype="auto", filestart=0,
95659565
VerbosePrintOut("'" + outfcs + "' != " + "'" + infcs + "'")
95669566

95679567
if(outfjsonsize > 0):
9568-
if(outfjsonchecksum == injsonfcs):
9568+
if(hmac.compare_digest(injsonfcs, outfjsonchecksum)):
95699569
if(verbose):
95709570
VerbosePrintOut("File JSON Data Checksum Passed at offset " + str(outfjstart))
95719571
VerbosePrintOut("'" + outfjsonchecksum + "' == " + "'" + injsonfcs + "'")

0 commit comments

Comments
 (0)