atlassian-api / atlassian-python-api

Atlassian Python REST API wrapper
https://atlassian-python-api.readthedocs.io
Apache License 2.0
1.29k stars 642 forks source link

Comma in expand query param causes issue if URL encoded #1386

Closed amitjoy closed 1 month ago

amitjoy commented 1 month ago

I just found out that if the comma in expand query param is URL encoded, the request returned 404 whereas if the comma is used in the expand param to separate the list, it is accessible

For example:

https://SERVER/rest/api/content?spaceKey=PRS&limit=100&status=current&expand=body.storage,version&type=pagehttps://SERVER/rest/api/content?spaceKey=PRS&limit=100&status=current&expand=body.storage%2Cversion&type=page

I am not able to retrieve the page content due to this issue at all. Could anyone kindly have a look?

amitjoy commented 1 month ago

The following lines in atlassian.rest_client.AtlassianRestAPI.request causes the issue:

 if params:
      url += urlencode(params or {})
gonchik commented 1 month ago

@amitjoy feel free to send PR