Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Unicode handling bug when using web upload #1815

Closed
mayli opened this issue Jun 4, 2023 · 2 comments · Fixed by #1816
Closed

[Bug]: Unicode handling bug when using web upload #1815

mayli opened this issue Jun 4, 2023 · 2 comments · Fixed by #1816
Labels
bug Something isn't working

Comments

@mayli
Copy link
Contributor

mayli commented Jun 4, 2023

Describe the issue

Uploading content with unicode folder/filename from the web results corrupted file name and chapter name.
The folder name is handled correctly though.

Steps to reproduce the issue

  1. Unzip this
    test-你好-test.zip
  2. Do folder upload in Chrome/Windows (or any browser?), upload preview is showing expected filenames.
    image
  3. Check library
    image

Audiobookshelf version

v2.2.22

How are you running audiobookshelf?

Docker

@mayli mayli added the bug Something isn't working label Jun 4, 2023
@mayli
Copy link
Contributor Author

mayli commented Jun 4, 2023

I feel it's due to the client is not encoding filename field properly, the webapp is sending

-----------------------------2053958995873082311542031043
Content-Disposition: form-data; name="0"; filename="test-ä½ å¥½-test/llama-ç¾�驼-2.91.mp3"
Content-Type: audio/mpeg

And the server side saved that as-is.

The proper way to handle utf-8 filename is RFC6266, for example

Content-Disposition: form-data; name="file"; filename="foo-%c3%a4.html"; filename*=UTF-8''foo-%c3%a4.html

Found another victim of axios

@mayli
Copy link
Contributor Author

mayli commented Jun 4, 2023

Fixed by #1816
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant