Skip to content

fix: close public user creation endpoints - #236

Merged
apsantiso merged 1 commit into
masterfrom
fix/close-public-user-creation
Nov 9, 2026
Merged

apsantiso merged 1 commit into
masterfrom
fix/close-public-user-creation

Conversation

@apsantiso

@apsantiso apsantiso commented Nov 9, 2026 •

Copy link
Copy Markdown
Member

What

  • Remove POST /users and POST /v2/users
  • Drop disposable email check and disposable-email
  • e2e: create users via createTestUser

Why

  • These endpoints let anyone create users without auth. Users are now created through the gateway (that uses JWT).
  • internxt/disposable needs manual updates and brings axios vulnerabilities.
  • It never worked in prod: the domain list loads before the runtime download finishes and is never reloaded.
  • Disposable email checks belong to drive-server and other gateway clients, if they need them.

- remove POST /users and POST /v2/users (unauthenticated)
- drop disposable-email check and dependency
- e2e: create users via createTestUser
@apsantiso apsantiso self-assigned this Nov 9, 2026
@apsantiso
apsantiso marked this pull request as ready for review November 9, 2026 13:15
@apsantiso
apsantiso requested a review from sg-gs as a code owner November 9, 2026 13:15
Comment thread lib/core/users/usecase.ts
}

const emailDomain = emailMatch[2];
const allowedEmail = disposable.validate(emailDomain);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a filter for spammy emails, why do you remove it?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sg-gs it wasn't working in prod, so instead of keeping a useless lib that adds tech debt every time axios has a vulnerability, I removed it.

I could've added a dependency-free library that actually works, but suddenly enabling a filter that hasn't worked in prod for a long time could start blocking signups that work today. This check could fit better in drive-server, where we have more control and visibility.

@apsantiso
apsantiso merged commit 464d76f into master Nov 9, 2026
10 of 11 checks passed
@apsantiso
apsantiso deleted the fix/close-public-user-creation branch November 9, 2026 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants