fix: encode spaces in caldav URLs - #1262
Conversation
6e38ce7 to
b952d85
Compare
|
This primarily fixes the use case where user as a space within your username attempts to use the Calendar or other MCP tools.
|
|
Hi @papatenko can you please add tests for this case? Spaces in usernames is a common source of strange bugs and is covered in other aspects of the codebase already |
1910f91 to
2c72042
Compare
2c72042 to
7873edf
Compare
|
|
@cbcoutinho I added tests for it and narrowed down the scope of the bug fix to just CalDAV. Calendar was the main issue to begin with; everything else works, except Contacts when using Claude Web. Here is the error I got from Claude:
Don't believe that is a result of the additions I made, but I could be wrong. |



Nextcloud hrefs embed the raw username. When the UID has a space, caldav's
URL.join()keeps it andDAVObject.__init__rejects the URL, breaking calendar reads and writes.Changes
calendar.py: quote the username in the calendar-home URL and patch caldavURL.join()to percent-encode joined pathsunquote()+quote()is idempotent, so already-encoded URLs are unaffected.