After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 569199 - incorrectly open smb workgroup using a space
incorrectly open smb workgroup using a space
Status: RESOLVED FIXED
Product: gvfs
Classification: Core
Component: smb backend
1.1.x
Other Linux
: Normal normal
: ---
Assigned To: gvfs-maint
gvfs-maint
Depends on:
Blocks:
 
 
Reported: 2009-01-26 15:09 UTC by Sebastien Bacher
Modified: 2009-03-05 14:27 UTC
See Also:
GNOME target: ---
GNOME version: 2.23/2.24



Description Sebastien Bacher 2009-01-26 15:09:42 UTC
The bug has been opened on https://bugs.launchpad.net/bugs/311689

"This was also an issue in whichever version of Nautilus came with Ubuntu 8.04.

If you try to go so a smb:/// in Nautilus and you have a work group with a space in the name ("My Network") Nautilus resolves the spaces to the "%20" character when requesting access to the share ("smb://my%20network/") and this results in a 0 item folder since that is not the proper name for the windows share (should be "smb://my network/").

My installation was originally 8.04 which I upgraded to 8.10 through synaptic in case that matters.

My samba configuration itself has been quite an ordeal but I found that when things were working this issue prevented me from seeing my network shares anyways."
Comment 1 Alexander Larsson 2009-03-05 13:13:00 UTC
I'm not sure why you say the "proper" name is "smb://my network", as that is an invalid URI. In URIs spaces should be escaped as %20. However, we're probably not unescaping that properly somewhere.
Comment 2 Alexander Larsson 2009-03-05 14:27:57 UTC
2009-03-05  Alexander Larsson  <alexl@redhat.com>

	Bug 569199 – incorrectly open smb workgroup using a space
	
	* client/gvfsuriutils.c (g_vfs_encode_uri),
	(g_vfs_decode_uri):
	Escape and unescape host part too. This means we handle
	e.g. smb workgroups with spaces in them. Allowing
	escapes in hostnames complies with RFC 3986.

	* client/gdaemonvfs.c (get_mountspec_from_uri): 
	Fix indentation