Skip to content

Commit

Permalink
Ensure JSON encoding handles non-ASCII characters in upload requests
Browse files Browse the repository at this point in the history
  • Loading branch information
arash77 committed Nov 8, 2024
1 parent eb7d89d commit a38bf57
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/galaxy/tools/actions/upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def replace_file_srcs(request_part):
if destination_type == "hdca":
_precreate_fetched_collection_instance(trans, history, target, outputs)

incoming["request_json"] = json.dumps(request)
incoming["request_json"] = json.dumps(request, ensure_ascii=False)
return self._create_job(trans, incoming, tool, None, outputs, history=history)


Expand Down
2 changes: 1 addition & 1 deletion lib/galaxy/webapps/galaxy/services/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def create_fetch(
clean_payload[key] = value
clean_payload["check_content"] = self.config.check_upload_content
validate_and_normalize_targets(trans, clean_payload)
request = dumps(clean_payload)
request = dumps(clean_payload, ensure_ascii=False)
create_payload = {
"tool_id": "__DATA_FETCH__",
"history_id": history_id,
Expand Down

0 comments on commit a38bf57

Please sign in to comment.