Skip to content

Can update a user's username to contain spaces #4240

@ericholguin

Description

@ericholguin

I'm submitting a ...

  • bug report
  • new feature / enhancement request
  • improvement request (usability, performance, tech debt, etc.)
  • other

Traffic Control components affected ...

  • CDN in a Box
  • Documentation
  • Grove
  • Traffic Control Client
  • Traffic Monitor
  • Traffic Ops
  • Traffic Ops ORT
  • Traffic Portal
  • Traffic Router
  • Traffic Stats
  • Traffic Vault
  • unknown

Current behavior:

When making a PUT request to /user/current with the following request body:

{
    "user": {
        "username": "space   test"
    }
}

The response returned is:

HTTP/1.1 200 OK
{
    "alerts": [
        {
            "text": "User profile was successfully updated",
            "level": "success"
        }
    ],
    "response": {
        "username": "space    test",
         .
         .
    }
}

Expected / new behavior:

Should not be allowed to update a username that contains spaces.
Should return:

HTTP/1.1 400 Bad Request
{
    "alerts": [
        {
            "text": "Couldn't parse request: username: cannot contain spaces",
            "level": "error"
        }
    ]
}

Minimal reproduction of the problem with instructions:

Anything else:

Metadata

Metadata

Assignees

Labels

Traffic Portal v1related to Traffic Portal version 1bugsomething isn't working as intendedgood first issuefirst-time committers will find this easy to resolvehacktoberfestlow impactaffects only a small portion of a CDN, and cannot itself break one

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions