-
Notifications
You must be signed in to change notification settings - Fork 32
Closed
Description
Describe the bug
The next href is not URL encoded. This results in errors when special characters like '+' are used in the parameter values.
To Reproduce
Steps to reproduce the behavior:
- Perform Item search query with properly URL encoded parameter value, eg.
datetime=2017-06-01T00%3A00%3A00%2B00%3A00%2F2023-07-29T23%3A59%3A59.999000%2B00%3A00 - The next href will contain a link that's not URL encoded: eg.
http://localhost:8000/search?datetime=2017-06-01T00:00:00+00:00/2023-07-29T23:59:59.999000+00:00&token=... - Requesting the next page via the indicating link results in a HTTP 400 error: Invalid parameters provided, because the '+' characters are parsed as spaces.
Expected behavior
The returned next href should be properly URL encoded.
Additional context
Probably can be solved by just removing the unquote() call on the parameter string.
stac-fastapi-elasticsearch-opensearch/stac_fastapi/core/stac_fastapi/core/models/links.py
Line 23 in d3c9138
| param_string = unquote(urlencode(params, True)) |
Metadata
Metadata
Assignees
Labels
No labels