fixed checking of IP address
- credits to trampster
This commit is contained in:
@ -103,7 +103,7 @@ object Utils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun checkIP(ip: String): Boolean {
|
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 {
|
fun checkUriUser(user: String): Boolean {
|
||||||
|
|||||||
Reference in New Issue
Block a user