Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

proppatch_scheddefault: store the value for the Inbox’s owner #5060

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dilyanpalauzov
Copy link
Contributor

When user a has w rights on b’s scheduling Inbox (user/b/#calendars/Inbox), then calling

curl -XPROPPATCH -Hcontent-type:application/xml -ua:a --data-binary @- <<EOF http://server/dav/calendars/user/b/Inbox
<propertyupdate xmlns="DAV:">
  <set>
    <prop>
      <c:schedule-default-calendar-URL xmlns:c="urn:ietf:params:xml:ns:caldav">
        <href>/dav/calendars/user/a/c</href>
      </c:schedule-default-calendar-URL>
    </prop>
  </set>
</propertyupdate>
EOF

must be rejected, as b’s default scheduling calendar must be owned by b (and the database stores anyway only the last part of the URL - here c).

Before this change, when a changed the schedule-default-calendar-URL on b/Inbox, then a/Inbox was in fact modified, not b‘s.

As the property is not masked, it must be stored either for "" (shared namespace), or the mailbox owner (b). This does not mean that it can be stored always for httpd_userid.

Disallow setting as default scheduling calendar Inbox, Outbox and Attachments.

@dilyanpalauzov
Copy link
Contributor Author

Should for non-mask-able properties the userid be "" or the mailbox-owner?

The property schedule-default-calendar-URL is considered mask-able in caldav_scheddefault() and propfind_calurl(), as the looup is done using annotatemore_lookupmask(). jmap_calendar.c:set_scheddefault() uses annotate_state_writemask(). But the property is not supposed to be masked (be per user for one and the same mailbox owner).

@dilyanpalauzov
Copy link
Contributor Author

  • Do not allow changing schedule-default-calendar-URL on resources
  • Ensure href is in the DAV: namespace
  • If the calendar is Default, delete the annotation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant