Underscores in Root URL not supported
DAVDroid Version 0.5.14-alpha from F-Droid
ownCloud 6 hosted on virtual server
LG Nexus 4, Android 4.4.4
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:
- Settings -> Accounts -> Create new account
- Set Root URL to a domain with underscores (e.g.
- Set random user name and password
- 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.
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
URIand doesn't raise
Closing because working as intended.
(You may use a hyphen instead).
Interesting - I should talk to my provider then.
Thanks for the info.
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
URISyntaxExceptionand warn the user (simple message like "Warning/error: underscores are not allowed in hostname.")
Thanks for support.
PS: respecting standards is good, handling exceptions is better.