forwardemail / caldav-adapter

CalDAV server for Node.js and Koa. Modernized and maintained for @forwardemail
https://forwardemail.net
MIT License
27 stars 9 forks source link

xBuild multistatus handles empty responses incorrectly #8

Closed HeikoTheissen closed 3 years ago

HeikoTheissen commented 3 years ago

https://github.com/sedenardi/node-caldav-adapter/blob/62a34c2c9204db37f789d08c378318127cb4090d/src/common/xBuild.ts#L29

If responses.length === 0, then res is constructed from the previous nsMap, so the <multistatus>element from previous response is returned again. Correct would be to return an empty <multistatus> element in that case.