diff --git a/app/build.gradle b/app/build.gradle index 59a66d58..6b4c46c0 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -7,8 +7,8 @@ android { applicationId = 'com.tutpro.baresip' minSdkVersion 21 targetSdkVersion 27 - versionCode = 39 - versionName = '5.2.0' + versionCode = 40 + versionName = '5.2.1' externalNativeBuild { cmake { cFlags '-DHAVE_INTTYPES_H' diff --git a/app/src/main/kotlin/com/tutpro/baresip/AccountActivity.kt b/app/src/main/kotlin/com/tutpro/baresip/AccountActivity.kt index 8ccff094..f37dafa5 100644 --- a/app/src/main/kotlin/com/tutpro/baresip/AccountActivity.kt +++ b/app/src/main/kotlin/com/tutpro/baresip/AccountActivity.kt @@ -402,14 +402,14 @@ class AccountActivity : AppCompatActivity() { private fun checkDisplayName(dn: String): Boolean { if (dn == "") return true - val dnRegex = Regex("^[a-zA-Z]([ ._-]|[a-zA-Z0-9]){1,63}\$") + val dnRegex = Regex("^([* .!%_`'~]|[+]|[-a-zA-Z0-9]){1,63}\$") return dnRegex.matches(dn) } private fun checkAuthUser(au: String): Boolean { if (au == "") return true val ud = au.split("@") - val userIDRegex = Regex("^[a-zA-Z]([._-]|[a-zA-Z0-9]){1,63}\$") + val userIDRegex = Regex("^([* .!%_`'~]|[+]|[-a-zA-Z0-9]){1,63}\$") val telnoRegex = Regex("^[+]?[0-9]{1,16}\$") if (ud.size == 1) { return userIDRegex.matches(ud[0]) || telnoRegex.matches(ud[0])