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

Fix(smbserver): Add filename encode to queryPathInformation #1583

Merged
merged 2 commits into from
Sep 14, 2023

Conversation

JerAxxxxxxx
Copy link
Contributor

fix #1582

In the queryPathInformation at the smb2.SMB2_FILE_ALL_INFO level, the encode of the filename is missing.

@JerAxxxxxxx
Copy link
Contributor Author

If there is no encode here, it will go to encode("latin-1") , but if there are Chinese or other language characters, it will report an error: 'latin-1' codec can't encode characters in position 0-3: ordinal not in range(256).

By the way, the SMB_QUERY_FILE_ALL_INFO method does encode('utf-16le') the filename, so I think it's missing here.

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

Successfully merging this pull request may close these issues.

Unable to mount file paths with Chinese characters in Linux
2 participants