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

Special characters at cifs mount password is not handled well #114

Open
baratiistok3 opened this issue Jan 18, 2023 · 2 comments
Open

Special characters at cifs mount password is not handled well #114

baratiistok3 opened this issue Jan 18, 2023 · 2 comments

Comments

@baratiistok3
Copy link

for example use a share with password: aF5T,g1f&QqqTx2E9w4f+19sm^f+g9 is not possible

In the logs I can see the following:
info: Share nas successfully unmounted volumio : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/bin/mount -t cifs -o username=volumio,password=aF5T,g1f&QqqTx2E9w4f+19sm^f+g9,ro,dir_mode=0777,file_mode=0666,iocharset=utf8,noauto,soft //*************/volumio /mnt/NAS/nas pam_unix(sudo:session): session opened for user root by (uid=0) pam_unix(sudo:session): session closed for user root info: An error occurred mounting the new share. Rolling back configuration CIFS: Attempting to mount //*************/volumio CIFS: Unknown mount option "g1f&QqqTx2E9w4f+19sm^f+g9"

@volumio
Copy link
Owner

volumio commented Jan 19, 2023

We shall probably encapsulate password with "

@ashthespy what do you think?

@ashthespy
Copy link
Collaborator

Isn't this already done by properQuote

ControllerNetworkfs.prototype.properQuote = function (str) {
// returns str as a single-quoted string, safe for exposure to a shell.

Perhaps the later call to mountutils.mount is playing with the quotes?

I really can't make out, the networkfs stuff is quite messy and could do with some love! 😬

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

3 participants