[GH-ISSUE #419] Some folder names with special characters will raise a 404 error #226

Closed
opened 2026-04-08 16:51:18 +03:00 by zhus · 1 comment
Owner

Originally created by @52funny on GitHub (Jul 21, 2024).
Original GitHub issue: https://github.com/sigoden/dufs/issues/419

Problem

In some cases, a 404 error may occur. For example, I have a folder in my directory called a&b which will be rendered as a&b on the front-end page, which will result in a 404 error on access.

image
image

Originally created by @52funny on GitHub (Jul 21, 2024). Original GitHub issue: https://github.com/sigoden/dufs/issues/419 **Problem** <!-- A clear and concise description of what the bug is. --> In some cases, a 404 error may occur. For example, I have a folder in my directory called `a&b` which will be rendered as `a&amp;b` on the front-end page, which will result in a 404 error on access. ![image](https://github.com/user-attachments/assets/27252157-eb2d-4995-b009-3a71e985d64c) ![image](https://github.com/user-attachments/assets/3c91120a-2819-436f-91a2-a8a048005b40)
zhus closed this issue 2026-04-08 16:51:18 +03:00
Author
Owner

@52funny commented on GitHub (Jul 22, 2024):

Author your commit #421 solves some problems but creates some new ones. For example, when the folder is some non-ASCII form of string, it may cause garbled problems. The root cause is that the atob function only accept a few ASCII characters, resulting in errors parsing strings beyond the 0xff range.

index.js #L111

image
<!-- gh-comment-id:2242153480 --> @52funny commented on GitHub (Jul 22, 2024): Author your commit #421 solves some problems but creates some new ones. For example, when the folder is some non-ASCII form of string, it may cause garbled problems. The root cause is that the `atob` function only accept a few ASCII characters, resulting in errors parsing strings beyond the `0xff` range. [index.js #L111](https://github.com/sigoden/dufs/blob/ca5c3d7c541f7aa89c42db312d12e634cdc41460/assets/index.js#L111) <img width="884" alt="image" src="https://github.com/user-attachments/assets/0f7d4776-186a-45fc-9df9-2b7840881510">
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sigoden/dufs#226