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

Backspace control character (U+0008) in string breaks filepath.Join #38

Closed
S52968 opened this issue Jun 25, 2024 · 1 comment
Closed

Comments

@S52968
Copy link

S52968 commented Jun 25, 2024

I don't know why but Fanbox allows the backspace character in titles.

Line 83 of client.go has an error because filepath.Join() loses the slash when the previous string terminates with a backspace control character.

For example:
filepath.Join("ab�", "test.txt") is expected to result in ab/test.txt (since you can't see the backspace), but instead you get abtest.txt.

I think it's a bug in the package, but it can be circumvented by removing non-printable characters. I'm not a Go dev but I messed around a little bit and used this code: https://gosamples.dev/remove-non-printable-characters/ and got it to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants