nextcloud / nextcloud/registration

email addresses with "+" get stuck in registration (or other forbidden characters)

Open
#721 8 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

1. to develop bug
Dominant language
JavaScript
Stars
147
Forks
83
Avg merge
1d 2h
Merged PRs (30d)
9

Description

When registering an email with a + in the address, the registration gets stuck when setting a password after verifying the email address.

This is because of the setting:
Administration settings -> Registration -> User settings -> Force email as login name

Related: server#21313 Allowed characters in username/userid

 

Steps to reproduce
  1. open Nextcloud in browser
  2. click Register
  3. Enter an email you own with a + character. E.g. your.name+something@gmail.com (GMail forwards mails to arbitrary prefixes behind a + for existing addresses)
  4. enter the verification code you got via mail
  5. try to set a passwort

 

Expected behaviour

Users should be able to register, regardless which characters their email addresses contain.

 

I guess the best solution in line with the Force email as login name policy would be to somehow automatically derive a valid username.

E.g. for first.last+something@example.org the + could be replaced with a _.

Just add a strategy for possible collisions. In case a user first.last+something@example.org and a user first.last_something@example.org register. (first the + and second the _, and also the other way around)

 

Actual behaviour

Only the following characters are allowed in a username: "a-z", "A-Z", "0-9", spaces and "_.@-'"
There's no input field to set another username.
There's only the password input field and a disabled input field which shows the registered email address.

Image

 

Server configuration

Web server: Apache (all Debian-12 default software)

Nextcloud version: 28 and 29 tested

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the registration flow with an email containing a + while Force email as login name is enabled, then trace where the username validation blocks password setup. Review the proposed username-derivation and collision cases; done means valid email addresses can complete registration without creating ambiguous usernames.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
authentication
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.