Can't create account with IPv6 address



  • Hello there,

    I'm using DAVdroid 1.2 and tried to create a new DAVdroid account with a IPv6 address.

    After entering the IP I got the following error message:
    Expected a closing square bracket for IPv6 address at index 0: [2a02

    The address is specified as
    https://[2a02:xxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx]

    CatLog gave Warnings at
    at.bitfire.davdroid.ui.setup.LoginCredentialsFragment.validateLoginData(LoginCredentialsFragment.java:138)
    at.bitfire.davdroid.ui.setup.LoginCredentialsFragment $1.onClick(LoginCredentialsFragment.java:75)

    I'm using Android Version 6.0.1.
    I hope you can help me.


  • developer

    And you're sure that the closing square bracket is correctly entered? Did you try with slash at the end?



  • @rfc2822 Yes, no matter what I type everytime the closing square bracket is expected before the first colon.
    It seems as if the first colon is recognized as the end of the host.

    I also tried it with a slash at the end.


  • developer

    Maybe problems with the IDN conversion …


  • developer

    Turns out that Android's Uri class doesn't understand IPv6 literals. It returns Error parsing port string. java.lang.NumberFormatException: Invalid int: "2::3]" when calling it for http://[2a02:2::3]/test because it interprets everything before the first : as host name, and everything else as port number (quality crafted by Google).

    Seems like we have to wrap the the check into a real Java URI.


Log in to reply
 

Looks like your connection to Bitfire App Forums was lost, please wait while we try to reconnect.