Skip to content

Cannot create user with "#" in a username #1250

@dlorych

Description

@dlorych

Describe the bug

Calling func (us *UserService) CreateUser(params UserParams) error with UserParams having username set to a value with "#" (e.g. test#1) end with an 409 response: The userName that was provided in the request path does not match the userName in the provided user configuration object.

Interestingly, the CreateUser REST API (according to REST API docs should be a HTTP POST /access/api/v2/users call. There's no username in the request path.

Looks that 2 functions CreateUser and UpdateUser are using wrong HTTP request methods. CreateUser should call POST and UpdateUser should call PUT (the Update User is not specified in REST API docs) - currently it is the other way.

Anyway, calling func (us *UserService) UpdateUser(params UserParams) error with UserParams having username set to a value with "#" (e.g. test#1) is returning the same 409 response :/.

Note: there's no issue to create a user with # in the username through UI.

Current behavior

Calling func (us *UserService) CreateUser(params UserParams) error with UserParams having username set to a value with "#" (e.g. test#1) end with an 409 response: The userName that was provided in the request path does not match the userName in the provided user configuration object.

Reproduction steps

Call func (us *UserService) CreateUser(params UserParams) error with UserParams having username set to a value with "#" (e.g. test#1)

Expected behavior

Calling func (us *UserService) CreateUser(params UserParams) error with UserParams having username set to a value with "#" (e.g. test#1) ends with 201: Successful (as documented in REST API docs).

JFrog Client-Go version

v1.55

JFrog CLI version (if applicable)

No response

Operating system type and version

macOS 26.0.1 (25A362)

JFrog Artifactory version

7.117.5

JFrog Xray version

3.125.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions