Skip to content

Cannot use email as user name in the user creation form: "User name cannot contain special characters" #12228

@skatsubo

Description

@skatsubo

Describe the bug

Email addresses are not allowed as user name in the user creation form: UI gives an error "User name cannot contain special characters". Though email-as-user-name is permitted in backend.

Steps to reproduce

  1. Launch "Create user" in Administration Settings > Users.
  2. Enter email address in "User name" field.

Image

Expected behavior

When entering email as user name in the user creation form it should be accepted without errors.

Actual behavior

When entering email as user name in the user creation form it gets rejected with error "User name cannot contain special characters".

Additional context

Workaround 1. As the username validation is performed only in CreateUserModal.vue, but not performed in EditPanel.vue, my current UI-based workaround is:

  1. Create a user without @ in user name, e.g. replacing @ with underscore: sk_domain.tld.
  2. Edit the user and put @ back in user name, e.g. sk_domain.tld -> sk@domain.tld.

Workaround 2. Alternatively, auto-provisioning also works with email addresses as user names.

The issue seems to be caused by extra/redundant escaping in https://github.com/owncloud/web/pull/9703/files#diff-e4578202fcddaeb2086e30f2ed4fa01d7fc7944c8d185928937afa26eeb835b9R144

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type:BugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions