Uploaded image for project: 'Bitbucket Data Center'
  1. Bitbucket Data Center
  2. BSERV-12737

Parameter "path" causes "500 Internal Server Error" on Commits REST endpoint

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Low
    • None
    • 7.6.1
    • API - REST

    Description

      'path' parameter is not properly filtered in Rest API endpoint /rest/api/1.0/projects/{project_name}/repos/{repo_name}/commits, causing 500 internal server error. This is probably because that 'path' parameter is not properly filtered. The error can be reproduced by either of the following methods: (note in both cases the extra single quote at the end)

      1. GET request on: BITBUCKET_BASE_URL/rest/api/1.0/projects/{TEST}/repos/{test}/commits/test_string' or;
      2. GET request on: BITBUCKET_BASE_URL/rest/api/1.0/projects/{TEST}/repos/{test}/commits
        with parameters {"path": "test_string'"}

      Error message:

      /usr/bin/git rev-list --format=%H%x02%P%x02%aN%x02%aE%x02%at%x02%cN%x02%cE%x02%ct%n%B%n%x03END%x04 -1 test_string''' exited with code 128 saying: fatal: bad revision 'test_string'''\",\"exceptionName\":\"com.atlassian.bitbucket.scm.CommandFailedException\"
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              64a66461f772 Deng Gelei
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Backbone Issue Sync