OCM: shares using the `embedded` protocol are rejected with "Missing sharedSecret in protocol"
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 72/100
Hướng nghiên cứu
Đọc apps/cloud_federation_api/lib/Controller/RequestHandlerController.php, lần theo addShare() đến protocolCarriesSharedSecret(). Kiểm tra các quy tắc của giao thức OCM embedded được mô tả trong issue và tìm các bài kiểm thử hiện có cho yêu cầu chia sẻ. Hoàn tất khi các lượt chia sẻ embedded đến được nhà cung cấp đã đăng ký mà không cần sharedSecret, trong khi các giao thức yêu cầu sharedSecret vẫn từ chối những yêu cầu không có nó.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Bug description
POST /ocm/shares rejects every share that uses the OCM embedded protocol with HTTP 400 Missing sharedSecret in protocol, before the share reaches the registered ICloudFederationProvider.
The embedded protocol carries the resource inline (protocol: { "name": "multi", "embedded": <JSON> }) and, per the extension, needs no access credential: "No sharedSecret, access token, URI, or other access credential is required or defined for the embedded protocol." RequestHandlerController::protocolCarriesSharedSecret() nevertheless requires a sharedSecret for any protocol, so an app that registers a provider for an embedded resource type never sees such shares.
Senders can work around it by adding a dummy protocol.options.sharedSecret, which is what we do for now.
Steps to reproduce
- Register an
ICloudFederationProviderfor some resource type (e.g.calendar-event) in an app. - Send a correctly signed share to that server:
{ "shareWith": "[email protected]", "name": "x", "providerId": "…", "owner": "[email protected]", "sender": "[email protected]", "shareType": "user", "resourceType": "calendar-event", "protocol": { "name": "multi", "embedded": { "example": "value" } } } - Observe the response.
Expected behavior
Shares whose protocol is embedded (no access credential by design) are passed to the provider, which decides whether it can handle them; a sharedSecret is only required for protocols that define one.
Actual behavior
400 {"message":"Missing sharedSecret in protocol"}.
Nextcloud Server version
35 (35.0.3.2); master has the same check.
Operating system / PHP / Web server / Database
Official Docker image nextcloud:35-apache (Debian), PHP 8.5.13, Apache 2.4.71, PostgreSQL 18.7.
Is this bug present after an update or on a fresh install?
Fresh install.
Additional context
Found while implementing calendar invitations over OCM (calendar-event carried with embedded, proposed to the OCM spec in https://github.com/cs3org/OCM-API/pull/464). The code path is apps/cloud_federation_api/lib/Controller/RequestHandlerController.php, addShare() → protocolCarriesSharedSecret().
- Ngôn ngữ chính
- PHP
- Star
- 37.6k
- Fork
- 5.4k
- Merge trung bình
- 1 ngày 14 giờ
- Pull request đã merge (30 ngày)
- 640
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của nextcloud/server
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
34-feedback
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug]: GET /js/../<anything> returns 500 (NotPermittedException from JsController::getJs) instead of 404Có thể đã có người làm @lazerg đã nhận 8 ngày trước. Đang mở35-feedback
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug]: Dashboard widgets registered via OCA.Dashboard.register() sometimes never mount (spinner forever) – Vue 3 non-deep `callbacks` watcher raceCó thể đã có người làm @lazerg đã nhận 8 ngày trước. Đang mở35-feedback
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của nextcloud/server
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
ExpressionEngine/ExpressionEngine#5493 ·
Maintainer thường phản hồi trong vòng 5 ngày
-
"Attempt to read property 'username' on null" error after a user is deletedCó thể đã có người làm @dicksonlaw583 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
omeka/plugin-SimplePages#49 ·
-
Copy button does not workĐang mởnot confirmed
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Bug Status: Needs Triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày