From 615d6c433def06104bb27bfb0c3aeec661b7b5b4 Mon Sep 17 00:00:00 2001 From: RaJiska Date: Tue, 29 Aug 2017 17:14:16 +0200 Subject: [PATCH] Pin attempts not reset upon success fix --- include/classes/user.class.php | 1 + 1 file changed, 1 insertion(+) diff --git a/include/classes/user.class.php b/include/classes/user.class.php index 0d761fde..85485c10 100644 --- a/include/classes/user.class.php +++ b/include/classes/user.class.php @@ -292,6 +292,7 @@ class User extends Base { count($aPin) == 1 ? $pin_hash = $this->getHash($pin, 0) : $pin_hash = $this->getHash($pin, $aPin[1], $aPin[2]); $stmt = $this->mysqli->prepare("SELECT pin FROM $this->table WHERE id = ? AND pin = ? LIMIT 1"); if ($stmt->bind_param('is', $userId, $pin_hash) && $stmt->execute() && $stmt->bind_result($row_pin) && $stmt->fetch()) { + $stmt->close(); $this->setUserPinFailed($userId, 0); return ($pin_hash === $row_pin); }