Increased max authentication and stun/turn username as well as
display name length to 64 chars
This commit is contained in:
@@ -202,14 +202,14 @@ class Account(val accp: String) {
|
|||||||
|
|
||||||
fun checkDisplayName(dn: String): Boolean {
|
fun checkDisplayName(dn: String): Boolean {
|
||||||
if (dn == "") return true
|
if (dn == "") return true
|
||||||
val dnRegex = Regex("^([* .!%_`'~]|[+]|[-a-zA-Z0-9]){1,63}\$")
|
val dnRegex = Regex("^([* .!%_`'~]|[+]|[-a-zA-Z0-9]){1,64}\$")
|
||||||
return dnRegex.matches(dn)
|
return dnRegex.matches(dn)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun checkAuthUser(au: String): Boolean {
|
fun checkAuthUser(au: String): Boolean {
|
||||||
if (au == "") return true
|
if (au == "") return true
|
||||||
val ud = au.split("@")
|
val ud = au.split("@")
|
||||||
val userIDRegex = Regex("^([* .!%_`'~]|[+]|[-a-zA-Z0-9]){1,63}\$")
|
val userIDRegex = Regex("^([* .!%_`'~]|[+]|[-a-zA-Z0-9]){1,64}\$")
|
||||||
val telnoRegex = Regex("^[+]?[0-9]{1,16}\$")
|
val telnoRegex = Regex("^[+]?[0-9]{1,16}\$")
|
||||||
if (ud.size == 1) {
|
if (ud.size == 1) {
|
||||||
return userIDRegex.matches(ud[0]) || telnoRegex.matches(ud[0])
|
return userIDRegex.matches(ud[0]) || telnoRegex.matches(ud[0])
|
||||||
|
|||||||
Reference in New Issue
Block a user