diff --git a/mirai-core/src/commonMain/kotlin/BotAccount.kt b/mirai-core/src/commonMain/kotlin/BotAccount.kt index e2f570d98..589ea0acf 100644 --- a/mirai-core/src/commonMain/kotlin/BotAccount.kt +++ b/mirai-core/src/commonMain/kotlin/BotAccount.kt @@ -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