Skip to content

After #54153, removeListener on Sabre DAV server doesn't work #54501

Closed

Description

@salmart-dev

Generic fix for ⬇️

Problem

TL;DR: Inside Sabre, event listeners are sometimes removed. However, this won't work anymore as the actual event listener is wrapped inside an anonymous function/closure and the Sabre code checks for the identity of the listener ($listener === $callback).

In \Sabre\CalDAV\Schedule\Plugin:

$aclPlugin = $this->server->getPlugin('acl');
// [...]
$this->server->removeListener('propFind', [$aclPlugin, 'propFind']);

It disables the ACLs for a short period in order to access the invitee's properties to get their default schedule calendar URL. However, the line above won't work if the "real" listener is wrapped inside a closure. As a result, the listener is not removed anymore and the ACL checks still run and fail.

Originally posted by @st3iny in #54153 (comment)

Activity

  1. self-assigned this
    on Aug 19, 2025
  2. added theissue type on Aug 19, 2025
  3. st3iny commented on Aug 19, 2025

    @st3iny
    Member

    Thanks for creating the issue.

    The DavACL plugin case is fixed in #54485.

  4. reopened this on Aug 19, 2025
  5. added
    3. to review
    and removed
    2. developing
    on Aug 19, 2025
  6. github-actions commented on Nov 23, 2026

    @github-actions
    Contributor

    This issue has been automatically locked because it has been closed for more than 14 days. As we do not monitor closed issues, we are locking this issue to prevent further comments from getting lost in the noise.
    Please open a new issue if you have a similar problem instead. For general discussions, please use our forum: https://help.nextcloud.com

  7. locked as resolved and limited conversation to collaborators on Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

3. to review32-feedbackbugfeature: caldavfeature: dav

Type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions