mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-02-24 23:04:00 +08:00
checking if resulthash length is 40
This commit is contained in:
parent
669032e66e
commit
a8bf141ed7
1 changed files with 4 additions and 1 deletions
|
@ -78,7 +78,10 @@ class ResultController {
|
|||
const resulthash = result.hash;
|
||||
delete result.hash;
|
||||
delete result.stringified;
|
||||
if (req.ctx.configuration.resultObjectHashCheck.enabled) {
|
||||
if (
|
||||
req.ctx.configuration.resultObjectHashCheck.enabled &&
|
||||
resulthash.length === 40
|
||||
) {
|
||||
//if its not 64 that means client is still using old hashing package
|
||||
const serverhash = objectHash(result);
|
||||
if (serverhash !== resulthash) {
|
||||
|
|
Loading…
Reference in a new issue