Underscores in Root URL not supported



  • Specs

    DAVDroid Version 0.5.14-alpha from F-Droid
    ownCloud 6 hosted on virtual server
    LG Nexus 4, Android 4.4.4

    Summary

    Apparently the Root URL does not support underscores in the domain when creating a new account. The next button does not work (simply does not respond) after entering the server details. Root URLs without underscores work.

    Steps to reproduce:

    1. Settings -> Accounts -> Create new account
    2. Set Root URL to a domain with underscores (e.g. ud12_34.ud12.udmedia.de/...)
    3. Set random user name and password
    4. Try click on the next button -> nothing happens, it does not even try to connect

    If I remove the underscore (e.g. ud1234.ud12.udmedia.de/...) DAVDroid tries to connect, however it fails due to the server address being invalid (as expected). If I use my alternate server URL cloud.domain.net/..., everything works fine including login. However, I don't have a SSL certificate issued for that domain, hence I can't use HTTPS then.


  • developer

    Host names MUST – in contrast to DNS names which are not A or MX records – not contain underscores:

    The host name validation is not done by DAVdroid but by Java: DAVdroid will allow any host that is correctly parsed by URI and doesn't raise URISyntaxException.

    Closing because working as intended.

    (You may use a hyphen instead).



  • Interesting - I should talk to my provider then.
    Thanks for the info.



  • Hello rfc2822,

    I come back on this "issue", because I met it.
    As you said, and indeed you are right, underscore should not be allowed in DNS records.

    But still, your application has a problem: a lack of warning/error message when this error happens.

    Because of this behaviour (no warning at all), your application just looks like it is "no responding", and users -- which are not aware of this information, like I did -- will just quit your application and delete it when they meet this bad behaviour … like I did.

    Therefore, I think you should handling the URISyntaxException and warn the user (simple message like "Warning/error: underscores are not allowed in hostname.")

    Thanks for support.

    --
    Thibaud CANALE

    PS: respecting standards is good, handling exceptions is better. ;-)


Log in to reply
 

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