Dup of #9
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.4Summary
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.
ud12_34.ud12.udmedia.de/...
) - 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 URLcloud.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:
- http://domainkeys.sourceforge.net/underscore.html
- RFC 1738 3.1, look for “host”
- RFC 1034 3.5
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 raiseURISyntaxException
.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 CANALEPS: respecting standards is good, handling exceptions is better.