nextcloud / nextcloud/server

Allowed characters in username/userid

Open
#21,313 25 comments 19 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

1. to develop enhancement feature: users and groups hotspot: account name handling technical debt
Dominant language
PHP
Stars
36.9k
Forks
5.2k
Avg merge
2d 3h
Merged PRs (30d)
713

Description

How to use GitHub
  • Please use the 👍 reaction to show that you are interested into the same feature.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Is your feature request related to a problem? Please describe.
I'm always frustrated when a new bug arises from problems with some special characters (e.g. " " or "&") within userids. The manual says these characters are not allowed, but technically, it is not restricted and there are a lot of instances out there which have users containing spaces.

For one of my instances, I re-created all users without spaces and manually moved files, shares and other stuff to workaround different bugs (see below) which was rather painful. If this issue is solved, we could save admins and also (app) developers lots of time and prevent new issues.

Describe the solution you'd like

  1. Dis-allow " " and "&" (maybe even more potentially problematic characters) on user-creation.
  2. Migrate userids to new, "clean" ids. This will probably be the "do or die"-step of this issue. I know issues like https://github.com/nextcloud/server/issues/5488 have been closed, but seeing the trouble with userids, it might be worth to rethink the decision to close it. btw, that would be a nice enhancement also for other purposes.
  3. Deprecate userids with these characters and have a migration step which maps the ids to new ones.
  4. Possibly drop certain workarounds etc. which have been included to deal with special userids.

Describe alternatives you've considered
Wait for more bugs related to this topic and fix them one by one.

Additional context
Related issues (only open ones) I found in server (there are probably more in the apps' repositories) after a quick search:
https://github.com/nextcloud/server/issues/21298
https://github.com/nextcloud/server/issues/17610
https://github.com/nextcloud/server/issues/16877
https://github.com/nextcloud/server/issues/15641

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

The issue names no files or tests; begin by reading related server issues 21298, 17610, 16877, and 15641, along with the referenced discussion in issue 5488. Done would require an agreed scope for character validation, userid migration or deprecation, and affected workarounds.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend, databases
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.