Skip to content

Feat/block guest email domains - #1734

Open
jbhs wants to merge 2 commits into
nextcloud:mainfrom
jbhs:feat/block-guest-email-domains
Open

jbhs wants to merge 2 commits into
nextcloud:mainfrom
jbhs:feat/block-guest-email-domains

Conversation

@jbhs

@jbhs jbhs commented Oct 20, 2026 •

Copy link
Copy Markdown

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI.

The implementation, testing, and security review were carried out with the support of Claude (Claude Code). I reviewed the changes, ran lint/build and unit tests, and manually tested the feature on Nextcloud 34, 35 and 36.

Description

This feature adds a field in the admin area that allows you to exclude specific email domains and their subdomains from creating guest accounts. This is useful, for example, to prevent guest accounts from being created for email addresses that are intended to register as full accounts or that are intended to use the Federated Share feature.

The restriction applies in the guest creation API (i.e., in the share dialog). An error message is displayed in this case. For the command occ guests:add.

The ability for an admin to convert an existing account into a guest account has been intentionally left enabled.

User Interface

Admin

admin-area

User

invite-guest

Closes #925

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-20T20:51:20.312152Z
We couldn’t complete this review. Comment @codex review to try again.
e936873 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@jbhs

jbhs commented Oct 20, 2026

Copy link
Copy Markdown
Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Something went wrong. Try again later by commenting “@codex review”.

An unknown error occurred
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Add an admin setting with a list of email domains for which no guest
accounts can be created. An entry blocks the domain and all of its
subdomains, but not unrelated domains sharing the same suffix.

The check is enforced in the guest creation API and in occ guests:add.
Entries are normalised (lower-case, leading "@", "*." and dots removed)
and invalid entries are dropped. Internationalized domains are compared
in their punycode form, so "bücher.de" also blocks "xn--bcher-kva.de"
and upper-case variants. Existing guests are not affected.

Closes nextcloud#925

Assisted-by: ClaudeCode:claude-opus-5-5
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TDY7TLSfZ2zVWLDsTsnqrF
Signed-off-by: Johannes B. Hartmann <mail@jbhs.de>
@jbhs
jbhs force-pushed the feat/block-guest-email-domains branch from e936873 to d660dfb Compare October 20, 2026 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Blacklisting of mail domains for invitations

1 participant