Bug 503574

Summary: Cannot enter IPv6 address
Product: [Applications] kdeconnect Reporter: Dom <dominique>
Component: android-applicationAssignee: Albert Vaca Cintora <albertvaka>
Status: RESOLVED DUPLICATE    
Severity: normal CC: andrew.g.r.holmes, luna_kde
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Dom 2025-04-30 11:36:26 UTC
SUMMARY
Cannot add any IPv6 address to the custom addresses list.

STEPS TO REPRODUCE
1. Select: Open Settings
2. Select: Add devices by IP
3. Enter a valid IPv6 and press Ok

OBSERVED RESULT
Message : Invalid device name

EXPECTED RESULT
The IPv6 address should be added to the custom list

SOFTWARE/OS VERSIONS
Android

ADDITIONAL INFORMATION
src/org/kde/kdeconnect/DeviceHost.kt: line 46: 
      private val hostnameValidityPattern = Regex("^[0-9A-Za-z._-]+$")
shouldn't be:
      private val hostnameValidityPattern = Regex("^[0-9A-Za-z._-:]+$")
Comment 1 Dom 2025-05-24 07:01:21 UTC
It looks like entering a "colon" in the IP filed is not allowed.
Unless the underlying system is not IPv6 ready, I suppose that allowing the "colon" char in the regex string will fix this issue.
Comment 2 Dom 2025-05-24 07:04:40 UTC
Ok, after having connected my phone to my PC in IPv4 mode, switching my PC to IPv6 only doesn't drop the connection. So I guess it's Ok to allow entering IPv6 addresses in the IP field.
Comment 3 luna_kde 2025-06-20 04:54:37 UTC
This seems to be a duplicate of an earlier issue

*** This bug has been marked as a duplicate of bug 501372 ***