MD5 comparisons should be case insensitive.

This commit is contained in:
Daniel Scalzi 2020-07-07 22:47:22 -04:00
parent bace2e12e1
commit 6b755fef15
No known key found for this signature in database
GPG Key ID: D18EA3FB4B142A57
4 changed files with 6 additions and 6 deletions

2
.github/FUNDING.yml vendored
View File

@ -1,3 +1,3 @@
github: dscalzi
patreon: dscalzi
custom: ['https://www.paypal.com/paypalme2/dscalzi']
custom: ['https://www.paypal.me/dscalzi']

View File

@ -1009,7 +1009,7 @@ class AssetGuard extends EventEmitter {
}
let buf = fs.readFileSync(filePath)
let calcdhash = AssetGuard._calculateHash(buf, algo)
return calcdhash === hash
return calcdhash === hash.toLowerCase()
}
return false
}

6
package-lock.json generated
View File

@ -993,9 +993,9 @@
}
},
"electron": {
"version": "9.0.5",
"resolved": "https://registry.npmjs.org/electron/-/electron-9.0.5.tgz",
"integrity": "sha512-bnL9H48LuQ250DML8xUscsKiuSu+xv5umXbpBXYJ0BfvYVmFfNbG3jCfhrsH7aP6UcQKVxOG1R/oQExd0EFneQ==",
"version": "9.1.0",
"resolved": "https://registry.npmjs.org/electron/-/electron-9.1.0.tgz",
"integrity": "sha512-VRAF8KX1m0py9I9sf0kw1kWfeC87mlscfFcbcRdLBsNJ44/GrJhi3+E8rKbpHUeZNQxsPaVA5Zu5Lxb6dV/scQ==",
"dev": true,
"requires": {
"@electron/get": "^1.0.1",

View File

@ -41,7 +41,7 @@
},
"devDependencies": {
"cross-env": "^7.0.2",
"electron": "^9.0.5",
"electron": "^9.1.0",
"electron-builder": "^22.7.0",
"eslint": "^7.4.0"
},