Details
-
Bug
-
Resolution: Duplicate
-
Low
-
None
-
7.6.1
-
Severity 3 - Minor
-
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)
- GET request on: BITBUCKET_BASE_URL/rest/api/1.0/projects/{TEST}/repos/{test}/commits/test_string' or;
- 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
- duplicates
-
BSERV-12491 Improve error handling in commits page and REST endpoint
- Closed