Cross-user free/busy queries fail due to restrictive principal ACLs

未关闭
#318 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
48/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
php, symfony

调研方向

Start by locating PublicAwareDAVACLPlugin::getAcl() and review how it combines SabreDAV’s default principal permissions with the proposed authenticated read rule. Reproduce the cross-user PROPFIND and CalDAV scheduling request from the issue, checking that calendar-home-set is returned and busy periods are visible without exposing event details. The issue leaves the permanent permission scope open, so that decision needs review before the change is complete.

由索引模型根据 Issue 内容生成。

描述

feature request
Davis version

5.6.2

Installation method

Docker – standalone (with Caddy)

Database

MariaDB

Reverse proxy

Caddy

Authentication method

Internal (ADMIN_LOGIN / ADMIN_PASSWORD)

Affected protocol(s)
  • CalDAV
  • CardDAV
  • WebDAV
  • Admin dashboard
  • API
Client(s) exhibiting the issue

Apple Calendar (macOS), also reproducible with direct CalDAV requests through curl. The issue is server-side and likely affects other clients using CalDAV scheduling.

Relevant environment variables
AUTH_METHOD=Basic
APP_ENV=prod
WEBDAV_ENABLED=false
CARDDAV_ENABLED=true
CALDAV_ENABLED=true
Steps to reproduce
  1. Create two users, test-01 and test-02.
  2. Create an event in test-02's private calendar with TRANSP:OPAQUE. Verify that its calendar instance has transparent=0.
  3. As test-01, query test-02's availability through the CalDAV scheduling outbox.
Expected behaviour

Authenticated users should be able to retrieve other users' availability without gaining access to their private calendar events.

Actual behaviour

The scheduling request fails with:

<cal:request-status>3.7;No calendar-home-set property found</cal:request-status>

A cross-user PROPFIND on /dav/principals/test-02/ also returns an empty multistatus response, whereas the same request authenticated as test-02 succeeds.

Additional context

Cross-user free/busy queries fail because authenticated users cannot read other users' CalDAV principal properties, particularly calendar-home-set.

This prevents clients from retrieving attendees' availability, even when their calendars contain correctly configured busy events.

Proposed fix

The default SabreDAV principal ACL grants access to the owner and calendar delegates, but not other authenticated users.

I tested adding the following rule to PublicAwareDAVACLPlugin::getAcl(), immediately after $acl = parent::getAcl($node);:

if ($node instanceof \Sabre\CalDAV\Principal\User) {
    $acl[] = [
        'principal' => '{DAV:}authenticated',
        'privilege' => '{DAV:}read',
        'protected' => true,
    ];
}

This resolves the issue: cross-user PROPFIND requests now return calendar-home-set, and Apple Calendar correctly displays the attendee's busy period without exposing the appointment details.

The patch is a working proof of concept. It would be worth reviewing whether this is the appropriate permission scope for a permanent fix.

Any thoughts on this?

主要语言
PHP
星标
769
派生
45
平均合并
2 天 9 小时
30 天内合并 PR
4

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

tchapi/davis 的其他 Issue

查看 tchapi/davis 的全部 Issue

相似的 Issue

更多 PHP Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。