You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: avoid races during interactive drive acceptance (#4720)
### What happend:
- `alice@twake.app` created the shared drive invitation, at that point,
the recipient's Cozy URL(bob@twake.app) was not yet registered on the
owner side, so the system only sent the discovery email link
- because there was no recipient-side sharing request yet,
trusted-domain auto-accept job had nothing to accept yet
- `bob@twake.app` clicked the discovery link from the email
- the discovery flow created the recipient-side sharing request with
`PUT /sharings/:id` on the recipient Cozy, as soon as that request
arrived, the recipient recognized the sender as trusted (`linagora.com`)
and enqueued drive auto-accept.
- the browser then continued into the normal manual acceptance route:
`GET /auth/authorize/sharing?...`.
- both paths then touched the same sharing on the recipient side
- the sharing was actually accepted, and the owner side received a
successful `/answer`, but the browser/manual path hit a stale CouchDB
revision conflict and returned a `409` page.
### Changes
- mark discovery/authorize acceptance as interactive(without
auto-acceptance flow)
- make `SendAnswer` idempotent on conflicts
0 commit comments