Skip to content

Playback from Samba share fails if user's password contains @ symbol

Tested on Arch linux, latest (3.0.6-11) and nightly (4.0.0v20190324-1). No issue on Windows or OSX (likely due to different file access methods when accessing samba files).

When connecting to a samba share with a user whose password contains special characters (I think potentially mostly an issue with @), the request fails with the following message.

Your input can't be opened: VLC is unable to open the MRL 'smb://{host}/{share}/{pathToFile}'. Check the log for details.

Tools > Messages shows the following information:

smb error: open failed for '{host}/{share}/{pathToFile}' (Invalid argument)

Changing the password to one without the special character avoids the issue. I believe VLC on linux ends up attempting to access 'smb://{user}:{password}@{host}/{path}', and the password @ character is throwing this off and making a portion of the password appear to be the start of the hostname. The fix for this is likely to encode the password before constructing the MRL.

Not sure if this is the relevant code, but it appears that the password is not encoded through the flow and is constructed here: https://github.com/videolan/vlc/blob/573c42a71eb951cb3eb40f78799d33e861e50bdd/modules/access/samba.c#L61

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information