mirror of
https://github.com/Kunzisoft/KeePassDX.git
synced 2026-11-26 20:06:37 -08:00
Expanded minimum secret length functionality so that the user is alerted if the length is not long enough. This fixed an issue where the user wasnt alerted about invalid secret length but was still able to click ok and submit the string, bypassing the base32 check altogether.
This commit is contained in:
1 parent
9659b55bf3
commit
79e723545c
3 files changed
+9
-3
No files matched your search
@@ -216,6 +216,8 @@ data class OtpElement(var otpModel: OtpModel = OtpModel()) {
|
||||
const val MIN_OTP_DIGITS = 4
|
||||
const val MAX_OTP_DIGITS = 18
|
||||
|
||||
const val MIN_OTP_SECRET = 8
|
||||
|
||||
fun isValidCounter(counter: Long): Boolean {
|
||||
return counter in MIN_HOTP_COUNTER..MAX_HOTP_COUNTER
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user