Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Offical apps | Community apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Calendar
  3. Bug: CalDAV calendar-multiget returns 404 for percent-encoded resource URLs containing @

Bug: CalDAV calendar-multiget returns 404 for percent-encoded resource URLs containing @

Scheduled Pinned Locked Moved Solved Calendar
4 Posts 2 Posters 55 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • luckowL Offline
    luckowL Offline
    luckow
    translator
    wrote last edited by luckow
    #1

    With a little help from my AI friends. 🙂

    Description

    The CalDAV server returns calendar object URLs containing a percent-encoded @ character in DAV:href, but subsequently fails to resolve those same URLs in a calendar-multiget request.

    This prevents clients such as Mozilla Thunderbird from downloading the affected events.

    Steps to reproduce

    1. Create a calendar object whose resource filename contains @, for example:

    abc123@example.com.ics

    1. Request the calendar collection or perform the initial CalDAV synchronization.
    2. The server returns the object using an encoded DAV:href:
    <D:href>/caldav/users/example/calendars/1/abc123%40example.com.ics</D:href>
    
    1. Send a calendar-multiget request using exactly that returned href:
    <?xml version="1.0" encoding="UTF-8"?>
        <C:calendar-multiget
            xmlns:D="DAV:"
            xmlns:C="urn:ietf:params:xml:ns:caldav">
          <D:prop>
            <D:getetag/>
            <C:calendar-data/>
          </D:prop>
          <D:href>/caldav/users/example/calendars/1/abc123%40example.com.ics</D:href>
        </C:calendar-multiget>
    

    Actual result

    The server responds with:

      <D:response>
        <D:href>/caldav/users/example/calendars/1/abc123%40example.com.ics</D:href>
        <D:status>HTTP/1.1 404 Not Found</D:status>
      </D:response>
    

    Thunderbird consequently treats the event as missing or deleted:

    CalDAV: skipping unfound deleted item:
    .../abc123@example.com.ics

    The calendar object itself still exists. A full calendar-query can return its calendar-data successfully, so the failure appears specific to resource lookup through calendar-multiget.

    Expected result

    Any DAV:href returned by the server must be usable in subsequent CalDAV requests.

    The calendar-multiget request should return HTTP 200 and the corresponding calendar-data:

      <D:response>
        <D:href>/caldav/users/example/calendars/1/abc123%40example.com.ics</D:href>
        <D:propstat>
          <D:prop>
            <D:getetag>...</D:getetag>
            <C:calendar-data>...</C:calendar-data>
          </D:prop>
          <D:status>HTTP/1.1 200 OK</D:status>
        </D:propstat>
      </D:response>
    

    Impact

    • Affected events are stored on the server but remain invisible in Thunderbird.
    • Initial synchronization and forced resynchronization do not help.
    • Clients may incorrectly consider the affected resources deleted.
    • All resources whose filenames contain @ can be affected.

    Suggested fix

    Normalize or decode resource paths consistently when processing calendar-multiget requests.

    In particular:

    1. Parse each supplied DAV:href.

    2. Decode percent-encoded path segments exactly once.

    3. Resolve %40 to the same stored resource as @.

    4. Ensure the lookup logic uses the same URI normalization rules as the code that generates DAV:href.

    5. Add a regression test covering filenames such as:

      event@example.com.ics
      event%40example.com.ics

    The test should verify that an href returned during collection discovery can be passed unchanged to calendar-multiget and produces a successful response.

    Environment

    • Client: Mozilla Thunderbird using native CalDAV support
    • Request type: calendar-multiget
    • Calendar objects: valid VEVENT resources
    • Authentication and collection discovery: successful
    • Full calendar query: successful
    • Individual multiget lookup for percent-encoded hrefs: 404 Not Found

    Pronouns: he/him | Primary language: German

    1 Reply Last reply
    2
    • nebulonN Offline
      nebulonN Offline
      nebulon
      Staff
      wrote last edited by
      #2

      thanks, this should be fixed with https://git.cloudron.io/apps/calendar/-/commit/c96d59673ac499842ff043dc289be3432afb8925 pending an app package release.

      1 Reply Last reply
      2
      • nebulonN Offline
        nebulonN Offline
        nebulon
        Staff
        wrote last edited by
        #3

        The new package is out. @luckow would be great if you can test your use-case and see if it is fixed for you

        luckowL 1 Reply Last reply
        2
        • nebulonN nebulon

          The new package is out. @luckow would be great if you can test your use-case and see if it is fixed for you

          luckowL Offline
          luckowL Offline
          luckow
          translator
          wrote last edited by
          #4

          @nebulon That worked.

          Pronouns: he/him | Primary language: German

          1 Reply Last reply
          1
          • nebulonN nebulon marked this topic as a question
          • nebulonN nebulon has marked this topic as solved

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Bookmarks
          • Search