better validation

This commit is contained in:
Jack 2020-08-19 14:29:08 +01:00
parent a9f4dd14f8
commit d1312af73f

View file

@ -547,10 +547,10 @@ exports.testCompleted = functions.https.onCall(async (request, response) => {
if (verified === false || verified === undefined) {
if (keySpacing !== null && keyDuration !== null) {
if (
(keySpacing.sd <= 15 ||
keyDuration.sd <= 10 ||
keyDuration.average < 15) &&
obj.consistency < 70
keySpacing.sd <= 15 ||
keyDuration.sd <= 10 ||
keyDuration.average < 15 ||
(obj.wpm > 200 && obj.consistency < 60)
) {
console.error(
`possible bot detected by user (${obj.wpm} ${obj.rawWpm} ${