From 288a5a11e82edf00e6ca9b26dc2dc3425da98695 Mon Sep 17 00:00:00 2001 From: Juha Heinanen Date: Wed, 25 Jul 2018 08:40:15 +0300 Subject: [PATCH] fixed checking of IP address - credits to trampster --- app/src/main/kotlin/com/tutpro/baresip/Utils.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/tutpro/baresip/Utils.kt b/app/src/main/kotlin/com/tutpro/baresip/Utils.kt index 7fb1f93e..7bc55034 100644 --- a/app/src/main/kotlin/com/tutpro/baresip/Utils.kt +++ b/app/src/main/kotlin/com/tutpro/baresip/Utils.kt @@ -103,7 +103,7 @@ object Utils { } fun checkIP(ip: String): Boolean { - return Regex("^(([0-1]?[0-9]{1,2}\\.)|(2[0-4][0-9]\\.)|(25[0-5]\\.)){3}(([0-1]?[0-9]{1,2})|(2[0-4][0-9])|(25[0-5]))/$").matches(ip) + return Regex("^(([0-1]?[0-9]{1,2}\\.)|(2[0-4][0-9]\\.)|(25[0-5]\\.)){3}(([0-1]?[0-9]{1,2})|(2[0-4][0-9])|(25[0-5]))$").matches(ip) } fun checkUriUser(user: String): Boolean {