2
0
mirror of https://github.com/KDE/kdeconnect-android synced 2025-08-22 01:51:47 +00:00

Compare commits

...

2 Commits

Author SHA1 Message Date
Philip Cohn-Cort
a0a6accc66 Fix Regex syntax in DeviceHost.kt 2025-07-07 17:43:26 -04:00
David Barouh
f6f7d1e970 Edit DeviceHost.kt
Add the `:` character in the regex recognizing the IP address, to recognize IPv6 too.
2025-07-04 17:50:43 +00:00

View File

@ -43,7 +43,7 @@ class DeviceHost private constructor(private val host: String) {
companion object {
/** Ping timeout */
private const val PING_TIMEOUT = 3_000
private val hostnameValidityPattern = Regex("^[0-9A-Za-z._-]+$")
private val hostnameValidityPattern = Regex("^[0-9A-Za-z.:_-]+$")
@JvmStatic
fun isValidDeviceHost(host: String): Boolean {