Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
EmbedAPI: decode filepath before open them from S3 storage (#9860)
* EmbedAPI: decode filepath before open them from S3 storage We can use encoded URLs (e.g. with %20 for white spaces) for external requests since they are valid URLs. However, when it's internal and we get it from the storage, we have to convert them to regular characters (white spaces, in this example). We use `urllib.parse.unquote` for this before passing the filename to the S3 backend storage. Closes #8301 * `unquote` only the filename provided by the user * Remove the fix from v2 since it's deprecated anyways The path is calculated from inside `get_storage_path`, so there is no simple way to unquote only the filename. Whitespaces on names is an edge case and APIv2 should not be used anyways. So, I prefer to not fix the bug here than expose a security issue.
- Loading branch information