Skip to content

fix(ocm): fix wildcard providers and invite error handling - #1027

Merged
fschade merged 4 commits into
opencloud-eu:mainfrom
butonic:backport-wp4-803-804-811
Nov 18, 2026
Merged

fschade merged 4 commits into
opencloud-eu:mainfrom
butonic:backport-wp4-803-804-811

Conversation

@butonic

@butonic butonic commented Nov 17, 2026

Copy link
Copy Markdown
Member

Three small fixes to OCM invite and provider handling:

  • a wildcard provider in the json authorizer can now be resolved for more than one domain. Resolving it used to overwrite the configured domain with the first match, so every other instance matching the same wildcard got a NotFound. We now return a copy and leave the configured provider alone.
  • accepting an invite generated by the same instance is rejected with an invalid argument instead of creating a federated connection to yourself.
  • the accept invite endpoint passes on the actual reason of an invalid request instead of always saying "token has expired", and no longer leaks internal error messages for unexpected errors (they are logged instead).

Review commit by commit: the first three carry the original fixes, the last adds a test for the wildcard lookup that fails without the first commit.

AI assistance: Claude Code (claude-opus-5-5) cherry-picked the fixes, wrote the test and this description.

kobergj and others added 4 commits November 17, 2026 16:32
Allow sharing with more than one instance matched by a wildcard domain.
Do not overwrite the cached provider with the actual domain, return a copy
instead, and include the cause in the GetInfoByDomain error.

Signed-off-by: Jörn Friedrich Dreyer <[email protected]>
Users must not be able to invite themselves to their own federated
connection.

Signed-off-by: Jörn Friedrich Dreyer <[email protected]>
Pass the status message of an invalid ForwardInvite request to the client
instead of always claiming the token expired, and do not leak internal
error messages for unexpected errors.

Signed-off-by: Jörn Friedrich Dreyer <[email protected]>
Resolving a wildcard provider used to overwrite the configured domain
with the first resolved one, so a lookup for another instance matching
the same wildcard returned NotFound. Look up two domains in turn to
make sure every lookup resolves the wildcard on its own.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Jörn Friedrich Dreyer <[email protected]>
@fschade
fschade merged commit 2f2455d into opencloud-eu:main Nov 18, 2026
20 checks passed
@openclouders openclouders mentioned this pull request Nov 18, 2026
1 task
pbleser-oc added a commit to pbleser-oc/opencloud that referenced this pull request Nov 19, 2026
opencloud-eu/reva#895 (the revision cleanup) was merged into reva main
with 5a237e94c, so the temporary replace of its fork is no longer
needed. Along with it comes the other reva change merged since
37496dc6a, opencloud-eu/reva#1027 (OCM invite and provider fixes): an
invalid invitation token is now rejected with the actual reason, so the
acceptance test of an expired token expects "token not valid" instead of
"token has expired", as in opencloud-eu#4065.

Assisted-by: Claude Code:claude-opus-5-5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants