Details
-
Bug
-
Resolution: Unresolved
-
Low
-
None
-
5.10.8, 6.0.4
-
1
-
Severity 3 - Minor
-
0
-
Description
Summary
Rest api call doesn't work correctly when the page title starts with numbers
Environment
Confluence 5.10.8
Steps to Reproduce
- Create a page and name it "test"
- Run this call:
curl -u admin:admin -s -n http://localhost:8090/rest/api/content/search?cql=title=test | python -mjson.tool
- Call returns correct result
- Now create a page and call 100test
- Run this call:
curl -u admin:admin -s -n http://localhost:8090/rest/api/content/search?cql=title=100test | python -mjson.tool
Expected Results
You should get a result of the search since the page exist.
Actual Results
You get a 400 error like the following
{ "data": { "authorized": false, "errors": [], "notSuccessful": true, "successful": false, "valid": true }, "message": "Unrecognised clause at : test", "statusCode": 400 }
Workaround
Encode the " when running the query to look like this
curl -u admin:admin -s -n http://localhost:8090/rest/api/content/search?cql=title=%22100test%22 | python -mjson.tool