From 1aa9abd77d59b11c21de585387fbeaae21b6a76a Mon Sep 17 00:00:00 2001 From: Juha Heinanen Date: Thu, 12 Nov 2020 18:19:33 +0200 Subject: [PATCH] Increased max authentication and stun/turn username as well as display name length to 64 chars --- app/src/main/kotlin/com/tutpro/baresip/Account.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/kotlin/com/tutpro/baresip/Account.kt b/app/src/main/kotlin/com/tutpro/baresip/Account.kt index 50b70d13..4675f180 100644 --- a/app/src/main/kotlin/com/tutpro/baresip/Account.kt +++ b/app/src/main/kotlin/com/tutpro/baresip/Account.kt @@ -202,14 +202,14 @@ class Account(val accp: String) { fun checkDisplayName(dn: String): Boolean { 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) } fun checkAuthUser(au: String): Boolean { if (au == "") return true 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}\$") if (ud.size == 1) { return userIDRegex.matches(ud[0]) || telnoRegex.matches(ud[0])