-
Bug
-
Resolution: Duplicate
-
Low
-
None
-
4.10.1, 5.1.0
-
None
-
None
-
Severity 3 - Minor
-
Summary
If you try to find a user with a special character in it's username (user@email.com) with Bitbucket's REST API you receive a NoSuchUserException:
{"errors":[{"context":null,"message":"User user@gmail.com does not exist.","exceptionName":"com.atlassian.bitbucket.user.NoSuchUserException"}]}
The REST Endpoint tested was:
http://localhost:7990/rest/api/1.0/users/user@gmail.com
This same error occurs if you use URL escape characters:
http://localhost:7990/rest/api/1.0/users/bstuart%40gmail.com
Steps to Reproduce
- Create a user with a username like user@gmail.com
- Use any method to GET a user at the endpoint http://localhost:7990/rest/api/1.0/users/
Expected Results
A response like the following:
{ "name": "user@gmail.com", "emailAddress": "user@gmail.com", "id": 1, "displayName": "user@gmail.com", "active": true, "slug": "user@gmail.com", "type": "NORMAL", "links": { "self": [ { "href": "http://localhost:7990/users/user@gmail.com" } ] } }
Actual Results
The below exception is thrown:
{"errors":[{"context":null,"message":"User user@gmail.com does not exist.","exceptionName":"com.atlassian.bitbucket.user.NoSuchUserException"}]}
Workaround
There is no workaround currently.
- duplicates
-
BSERV-9256 Rest endpoints do not work for users with special characters in their username
- Gathering Impact
- relates to
-
SRCTREEWIN-7492 Can't authenticate a username with a special character in Bitbucket Server
- Short Term Backlog