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

crash with non-ascii ACLs #277

Closed
ThomasWaldmann opened this issue Oct 16, 2015 · 2 comments
Closed

crash with non-ascii ACLs #277

ThomasWaldmann opened this issue Oct 16, 2015 · 2 comments

Comments

@ThomasWaldmann
Copy link
Member

See there: jborg/attic#351

This can be fixed by just not doing the decode/encode, but processing the information as (undecoded) byte strings.

On UNIX-like systems filenames are just bytestrings, maybe we should treat ACLs in the same way.
As we do not know the encoding, there is no other way anyway. Even if we could find out one "correct" encoding, then especially on Samba shares, encoding could be mixed up. Sometimes one even sees total crap there, like double-encoded stuff.

Trying to guess the encoding does not work reliably for many cases.
Trying to decode and react to UnicodeDecodeErrors by decoding differently also only works for utf-8 (and ascii, which is a subset of utf-8), but does not for all single-byte encodings (because for them, usually all 256 possible values are mapped to characters).

Thus: just work with bytestrings, do not try to decode.

Note: this is platform-specific code, so this has to be checked and tested for all supported platforms.


💰 there is a bounty for this

@ThomasWaldmann
Copy link
Member Author

working on this.

@ThomasWaldmann
Copy link
Member Author

#310 should resolve this (as far as possible).

See the commit comments there for details.

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

No branches or pull requests

1 participant