mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-24 23:20:09 +08:00
Require password length to be at most 16 on BotAccount init. #993
This commit is contained in:
parent
f2d9c0e5d2
commit
ad6d95cee5
@ -33,7 +33,9 @@ internal data class BotAccount(
|
|||||||
id,
|
id,
|
||||||
passwordPlainText.md5(),
|
passwordPlainText.md5(),
|
||||||
phoneNumber
|
phoneNumber
|
||||||
)
|
) {
|
||||||
|
require(passwordPlainText.length <= 16) { "Password length must be at most 16." }
|
||||||
|
}
|
||||||
|
|
||||||
override fun equals(other: Any?): Boolean {
|
override fun equals(other: Any?): Boolean {
|
||||||
if (this === other) return true
|
if (this === other) return true
|
||||||
|
Loading…
Reference in New Issue
Block a user