From f6f7d1e9709a0396f3653923ea01b622cee5b2ba Mon Sep 17 00:00:00 2001 From: David Barouh Date: Fri, 4 Jul 2025 17:50:43 +0000 Subject: [PATCH] Edit DeviceHost.kt Add the `:` character in the regex recognizing the IP address, to recognize IPv6 too. --- src/org/kde/kdeconnect/DeviceHost.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/org/kde/kdeconnect/DeviceHost.kt b/src/org/kde/kdeconnect/DeviceHost.kt index 4ed0b7d0..f1b8664d 100644 --- a/src/org/kde/kdeconnect/DeviceHost.kt +++ b/src/org/kde/kdeconnect/DeviceHost.kt @@ -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 {