elementary/calendar

CalDAV url query parameters removed, query has connection token

Opened this issue · 1 comments

What Happened

When creating CalDAV calendar with token in url query, token is stripped when saving. This causes to fail connecting.

Steps to Reproduce

  1. Click Add new calendar
  2. Input url: https://example.com:443/?asd=dsa
  3. Click Create calendar
  4. Click Edit icon next to newly created calendar

The URL would contain https://example.com:443/ (without query)

Platform Information

elementary OS 5.1.7 Hera, 5.9.10-050910-generic


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

It seems to be pretty easy to fix. I tried fixing it myself but:

  1. I couldn't find any docs on what is E and SourceWebdav, only thing I found is ESourceWebdav on gnome docs but it doesn't have methods that are in the code.
  2. I added uri.get_query but then I couldn't install the result build of the calendar. (built 5.1.1 inside the docker container)

Master:

if (uri.get_port () != 80) {
((Gtk.Entry)url_entry.widget).text = "%s://%s:%u%s".printf (uri.get_scheme (), uri.get_host (), uri.get_port (), uri.get_path ());
} else {
((Gtk.Entry)url_entry.widget).text = "%s://%s%s".printf (uri.get_scheme (), uri.get_host (), uri.get_path ());
}

5.1.1:
https://github.com/elementary/calendar/blob/5.1.1/plugins/CalDAV/CalDAVBackend.vala#L77-L81