Require password length to be at most 16 on BotAccount init. #993

This commit is contained in:
Him188 2021-02-07 19:00:21 +08:00
parent f2d9c0e5d2
commit ad6d95cee5

View File

@ -33,7 +33,9 @@ internal data class BotAccount(
id,
passwordPlainText.md5(),
phoneNumber
)
) {
require(passwordPlainText.length <= 16) { "Password length must be at most 16." }
}
override fun equals(other: Any?): Boolean {
if (this === other) return true