OCM: shares using the `embedded` protocol are rejected with "Missing sharedSecret in protocol"
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 72/100
Línea de trabajo
Lee apps/cloud_federation_api/lib/Controller/RequestHandlerController.php y sigue addShare() hasta protocolCarriesSharedSecret(). Comprueba las reglas del protocolo OCM embedded descritas en el issue y encuentra las pruebas existentes para las solicitudes de compartición. El trabajo estará terminado cuando las comparticiones embedded lleguen al proveedor registrado sin sharedSecret, mientras que los protocolos que lo requieren sigan rechazando las solicitudes que no lo incluyan.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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().
- Lenguaje dominante
- PHP
- Estrellas
- 37.6k
- Forks
- 5.4k
- Merge medio
- 1 d 14 h
- PR fusionados (30 d)
- 640
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de nextcloud/server
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
34-feedback
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
[Bug]: GET /js/../<anything> returns 500 (NotPermittedException from JsController::getJs) instead of 404Posiblemente ocupada @lazerg la tomó hace 8 días. Abierto35-feedback
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
[Bug]: Dashboard widgets registered via OCA.Dashboard.register() sometimes never mount (spinner forever) – Vue 3 non-deep `callbacks` watcher racePosiblemente ocupada @lazerg la tomó hace 8 días. Abierto35-feedback
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Los mantenedores suelen responder en 1 día
Todos los issues de nextcloud/server
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
ExpressionEngine/ExpressionEngine#5493 ·
Los mantenedores suelen responder en 5 días
-
"Attempt to read property 'username' on null" error after a user is deletedPosiblemente ocupada @dicksonlaw583 la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
omeka/plugin-SimplePages#49 ·
-
Copy button does not workAbiertonot confirmed
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Los mantenedores suelen responder en 1 día
-
enhancement good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
Los mantenedores suelen responder en 1 día
-
Bug Status: Needs Triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día