-
Bug
-
Resolution: Fixed
-
Low
-
5.7.3, 5.16.0
-
None
-
None
-
2
-
Severity 3 - Minor
-
6
-
Summary
When opening a pull request (overview, diff or commits tab), a 500 error is displayed and the details are not loaded.
Steps to Reproduce
- Add the following string to the description:
************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
- Save the change to the description
Expected Results
The pull request loads successfully.
Actual Results
The pull request does not load.
The below exception is thrown in the atlassian-bitbucket.log file:
ERROR [http-nio-7990-exec-1] <user> <request> <ip> "GET /projects/<project>/repos/<repository>/pull-requests/<pull request id>/overview HTTP/1.1" o.a.c.c.C.[.[.[.[springMvc] Servlet.service() for servlet [springMvc] threw exception java.lang.StackOverflowError: null at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3799) at java.util.regex.Pattern$GroupHead.match(Pattern.java:4660) at java.util.regex.Pattern$Loop.match(Pattern.java:4787) at java.util.regex.Pattern$GroupTail.match(Pattern.java:4719) at java.util.regex.Pattern$Curly.match0(Pattern.java:4281) at java.util.regex.Pattern$Curly.match(Pattern.java:4236) at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3800) at java.util.regex.Pattern$GroupHead.match(Pattern.java:4660) at java.util.regex.Pattern$Loop.match(Pattern.java:4787) at java.util.regex.Pattern$GroupTail.match(Pattern.java:4719) at java.util.regex.Pattern$Curly.match0(Pattern.java:4281) at java.util.regex.Pattern$Curly.match(Pattern.java:4236) at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3800)
Notes
There could be other strings leading to this behaviour. The exact description causing the problem can be detected by using the following rest API and inspecting the description field in the resulting Json.
rest/api/1.0/projects/<project>/repos/<repository>/pull-requests/<pull request id>
Workaround
Update the pull request by editing the description using the REST API
- Get the current version field from the GET rest/api/1.0/projects/<project>/repos/<repository>/pull-requests/<pull request id>
- Update the pull request by using the same endpoint (with PUT as a method)
curl --user username:password -H "Content-Type: application/json" --data @input.json -X PUT <Bitbucket_URL>/rest/api/1.0/projects/<project>/repos/<repository>/pull-requests/<pull request id>
Where the input.json file contains the following and version is the same value as the one returned by the request above:
{ "version": 6, "description": "expected description" }
Form Name |
---|