Uploaded image for project: 'Jira Platform Cloud'
  1. Jira Platform Cloud
  2. JRACLOUD-59828

Basic authentication does not support non-ascii characters in usernames

XMLWordPrintable

      NOTE: This bug report is for JIRA Cloud. Using JIRA Server? See the corresponding bug report.

      Summary

      Copied from ACJIRA-513:
      When I call REST API using basic authentication and the user has a non-ASCII character in their name, e.g. 'ä', the status 401 (Unauthorized) is returned. The name:password string is converted into a byte array using UTF8 before base-64 encoding. I also tried ASCII, but that is not supposed to work anyway.
      Please note that JIRA user names can contain non-ASCII characters (e.g. umlauts) and a user with such a name can log in to JIRA using the web UI. rest/auth/1/session processes names with non-ASCII characters fine as well.

      Steps to Reproduce

      1. Step 1 - Create a user with non-ASCII character name like "łukasz"
      2. Step 2 - Do rest call as the user. "curl -u łukasz:test http://localhost:8090/jira/rest/api/2/issue/TEST-2"

      Expected Results

      Issue json should be returned for the user.

      Actual Results

      HTTP/1.1 401 Unauthorized
      Content-Encoding: gzip
      Content-Type: text/html;charset=UTF-8
      Date: Thu, 18 Feb 2016 10:53:23 GMT
      Server: Apache-Coyote/1.1
      Set-Cookie: JSESSIONID=91304E14DAA60D5A14292013A062A13B; Path=/jira/; HttpOnly
      Transfer-Encoding: chunked
      Vary: User-Agent
      WWW-Authenticate: OAuth realm="http%3A%2F%2Flocalhost%3A8090%2Fjira"
      X-AREQUESTID: 1313x7361x1
      X-ASEN: SEN
      X-Content-Type-Options: nosniff
      X-Seraph-LoginReason: AUTHENTICATED_FAILED
      

      Notes

      See ACJIRA-513 description and comments for more details.

      Workaround

      Remove non-ascii character from user name

              Unassigned Unassigned
              mpazik Marek Pazik (Inactive)
              Votes:
              11 Vote for this issue
              Watchers:
              11 Start watching this issue

                Created:
                Updated:
                Resolved: