Skip to content

Uploaded file's URL gets percent-encoded, breaking permissionsΒ #1709

@gnprice

Description

@gnprice

If someone sends a message with an uploaded file whose filename contains non-ASCII characters, we end up percent-encoding those characters in the URL in the message's link to the file.

The resulting behavior is that the file is visible to the person who originally sent it, but not to others who received the message, because the server doesn't recognize it as the same file when assigning permissions based on the message.

The URL comes from https://zulip.com/api/upload-file (i.e. UploadFileResult.uri β€” which BTW we should rename to url). Currently we call Uri.parse on it, and then .toString() on the resulting Uri object, which has the effect of percent-encoding it. Instead, we should pass the original uri/url value through verbatim as a String.

References

Metadata

Metadata

Assignees

Labels

a-composeCompose box, autocomplete, attaching files/imageslaunch feedbackThings users specifically asked for upon launch

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions