mirror of
https://github.com/go-vikunja/vikunja.git
synced 2026-08-30 09:07:40 -05:00
The handlers configured caldav-go through its setup functions, which write package-level globals that HandleRequest then reads. Between a request's setup and its handling another request could overwrite them, so two users syncing at the same time could be answered from each other's storage - the wrong user, the wrong projects. caldav-go takes the state per request now, so pass it there instead. A test driving eight concurrent requests per user fails against the old code both as a race report and as user1 receiving user15's calendar. TaskHandler never set a user or the supported components at all, so it answered current-user-principal with whichever username the last request happened to leave behind. It gets them like the others now.