Uploaded image for project: 'Bitbucket Server'
  1. Bitbucket Server
  2. BSERV-12311

Requests using access tokens with user agent Xcode fail when "Clone in Xcode" is disabled

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Low
    • Resolution: Fixed
    • Affects Version/s: 5.16.2, 6.10.2, 7.1.1
    • Fix Version/s: 6.10.4, 7.1.2
    • Component/s: API - REST
    • Labels:
      None

      Description

      Issue Summary

      When the "Clone in Xcode" integration is not enabled, Bitbucket will try to enable it when it receives REST API requests with an "Xcode" user agent. This succeeds when using basic authentication, but fails when using an access token.

      Steps to Reproduce

      1. Be sure "Clone in Xcode" is disabled at <base-url>/account.
      2. Make a request to the REST API using an access token (not basic auth), with an Xcode user agent: curl -X GET -H "User-Agent: Xcode/".

      Expected Results

      Bitbucket should allow Xcode as a user agent and the request should succeed.

      Actual Results

      The user receives a 500 error, and the below exception is thrown in the atlassian-bitbucket.log file:

      2020-04-15 12:01:45,404 ERROR [https-jsse-nio-8444-exec-20] *CTFXYJx721x9826216x11 s0w3ye 1.1.1.1 "GET /mvc/error500 HTTP/1.1" c.a.s.i.web.ErrorPageController There was an unhandled exception loading [/rest/api/1.0/application-properties]
      

      Workaround

      Navigate to <base-url>/account and enable "Clone in Xcode". This will prevent Bitbucket from attempting to enable it during the API request and triggering this error.

        Attachments

          Activity

            People

            Assignee:
            bturner Bryan Turner
            Reporter:
            smaruvada Shashank Maruvada
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: