[bug] When making CalDAV propfind call, jolla skips httpauth username

asked 2015-09-16 19:50:18 +0300

Will-Do gravatar image

updated 2015-09-24 14:13:34 +0300

i'm trying to set up a new CalDav account on my jolla, to share calendars between my computer and phone. The calendar set-up works fine on my computer (ubuntu/thunderbird) and did work fine as well on my phone while I was using my internal IP as server address.

Now I'm trying to get it working via my external server address as well (this works via my computer). The Jolla can access the CalDAV serveraddress via the browser, but when I'm adding the account via the settings I get the error "Oops, problem with account creation".

I removed the internal CalDAV accounts and tried adding them again to the Jolla, same error.

My serverlogs show that the phone tries to login twice, and one of those logins doesn't send the username with.

Settings:

  • CalDav server Radicale (radicale.org)
  • Server OS Ubuntu 15.4
  • Jolla OS 1.1.7.28, all updates installed

24/sept/2015, updated to Sailfish OS 2.0. CalDAV still won't connect

jolla-settings

As you can see in the logs the phone does two Propfind requests, of which only one carries the http-auth username;

1st part of the log:

'REMOTE_HOST': 'home.server.com',
'REQUEST_METHOD': 'PROPFIND',
 'REMOTE_HOST': 'home.server.com',
 'REQUEST_METHOD': 'PROPFIND',
 'SCRIPT_NAME': '',
 'SERVER_NAME': 'playground',
 'SERVER_PORT': '5232',
 'SERVER_PROTOCOL': 'HTTP/1.1',
 'SERVER_SOFTWARE': 'WSGIServer/0.1 Python/2.7.9',
 'wsgi.errors': <open file '/dev/null', mode 'w' at 0x7fc99362bdb0>,
 'wsgi.file_wrapper': <class wsgiref.util.FileWrapper at 0x7fc99368bc80>,
 'wsgi.input': <socket._fileobject object at 0x7fc99360c250>,
 'wsgi.multiprocess': False,
 'wsgi.multithread': True,
 'wsgi.run_once': False,
 'wsgi.url_scheme': 'http',
 'wsgi.version': (1, 0)}
 2015-09-16 17:52:36,844 - DEBUG: Sanitized path: /Willdo/
 2015-09-16 17:52:36,880 - DEBUG: Request content:
<d:propfind xmlns:d="DAV:" xmlns:cs="http://calendarserver.org/ns/" xmlns:c="urn:ietf:params:xml:ns:caldav"xmlns:ca="http://apple.com/$
2015-09-16 17:52:36,885 - DEBUG: Rights type 'owner_write'
2015-09-16 17:52:36,886 - DEBUG: Test if ':Willdo' matches against '.+:.*' from section 'r'
2015-09-16 17:52:36,886 - DEBUG: Test if ':Willdo' matches against '.+:^(/.*)?$' from section 'w'
2015-09-16 17:52:36,887 - DEBUG: Anonymous has NO read access to collection Willdo/
2015-09-16 17:52:36,887 - DEBUG: Rights type 'owner_write'
2015-09-16 17:52:36,887 - DEBUG: Test if ':Willdo' matches against '.+:.*' from section 'r'
2015-09-16 17:52:36,888 - DEBUG: Test if ':Willdo' matches against '.+:^(/.*)?$' from section 'w'
2015-09-16 17:52:36,888 - DEBUG: Anonymous has NO write access to collection Willdo/
2015-09-16 17:52:36,888 - DEBUG: Anonymous has NO read access to item aa5abca7-1eca-40bd-a5cb-411377fe0e6d.ics

2nd part of the log

 'REQUEST_METHOD': 'PROPFIND',
 'SCRIPT_NAME': '',
 'SERVER_NAME': 'playground',
 'SERVER_PORT': '5232',
 'SERVER_PROTOCOL': 'HTTP/1.1',
 'SERVER_SOFTWARE': 'WSGIServer/0.1 Python/2.7.9',
 'wsgi.errors': <open file '/dev/null', mode 'w' at 0x7fc99362bdb0>,
 'wsgi.file_wrapper': <class wsgiref.util.FileWrapper at 0x7fc99368bc80>,
 'wsgi.input': <socket._fileobject object at 0x7fc99360c250>,
 'wsgi.multiprocess': False,
 'wsgi.multithread': True,
 'wsgi.run_once': False,
 'wsgi.url_scheme': 'http',
 'wsgi.version': (1, 0)}
2015-09-16 17:52:36,934 - DEBUG: Sanitized path: /Willdo/
2015-09-16 17:52:36,968 - DEBUG: Request content:
<d:propfind xmlns:d="DAV:" xmlns:cs="http://calendarserver.org/ns/" xmlns:c="urn:ietf:params:xml:ns:caldav" xmlns:ca="http://apple.com/ns/ical/"><d:prop$
2015-09-16 17:52:36,973 - DEBUG: Rights type 'owner_write'
2015-09-16 17:52:36,974 - DEBUG: Test if 'Willdo:Willdo' matches against '.+:.*' from section 'r'
2015-09-16 17:52:36,974 - DEBUG: Section 'r' matches
2015-09-16 17:52:36,975 - DEBUG: Willdo has read access to collection Willdo/
2015-09-16 17:52:36,975 - DEBUG: Rights type 'owner_write'
2015-09-16 17:52:36,976 - DEBUG: Test if 'Willdo:Willdo' matches against '.+:.*' from section 'r'
2015-09-16 17:52:36,976 - DEBUG: Section 'r' matches
2015-09-16 17:52:36,976 - DEBUG: Test if 'Willdo:Willdo' matches against '.+:^Willdo(/.*)?$' from section 'w'
2015-09-16 17:52:36,976 - DEBUG: Section 'w' matches
2015-09-16 17:52:36,976 - DEBUG: Willdo has write access to collection Willdo/
2015-09-16 17:52:36,977 - DEBUG: Willdo has read access to item aa5abca7-1eca-40bd-a5cb-411377fe0e6d.ics
edit retag flag offensive close delete

Comments

I can confirm this bug.

ip - - [datetime] "REPORT /cal.php/calendars/user/calendar/ HTTP/1.1" 401 188 "-" "Mozilla/5.0"
ip - user [datetime] "REPORT /cal.php/calendars/user/calendar/ HTTP/1.1" 207 9072 "-" "Mozilla/5.0"

I use Baikal as server software.

gnuheidix ( 2015-09-16 21:23:07 +0300 )edit

It is normal for *DAV clients first to send an unauthorized request. No idea why though.

Tanghus ( 2015-09-16 23:31:28 +0300 )edit

if its normal to send this unauthorized request, I should see it with the thunderbird request as well I guess? I don't think its a server-side issue, as it works on thunderbird and I don't see two login requests when connecting with Thunderbird

Will-Do ( 2015-09-17 10:33:51 +0300 )edit

That is indeed a good question...

Tanghus ( 2015-09-17 11:26:09 +0300 )edit