GNOME Bugzilla – Bug 84004
symlinks from the desktop get URI decoded
Last modified: 2004-12-22 21:47:04 UTC
If I create a symlink on the desktop to a dir with http encoding, nautilus decodes it, and gets the name incorrect Reproduce: 1> mkdir %7Efoo 2> Use nautilus to create a link to that dir on the desktop 3> double-click on desktop item Actual results: Dialog saying cannot find "/home/frb/~foo" Expected results: New nautilus window with contents of "/home/frb/%7Efoo" Reproducibility: Always
I can reproduce this. 31-May-2002 snap from red-carpet, rh73/x86. Create a directory called "%2Egnome", right click on it and "Create Shortcut". Drag the shortcut to the desktop. Double-click on the shortcut and the .gnome directory is shown. This gives me an uneasy feeling wrt security, but I can't think of an immediately easy way to exploit it. Trashing the symlink moves the symlink to .Trash, deleting it deletes the symlink.
Hrm... did this already get decoded? I can't find it, Alex...
Created attachment 9025 [details] [review] escape link names when getting the target uri.
The attached patch uses gnome_vfs_escape_path_string to escape the link target before making a uri out of it.
Created attachment 9032 [details] [review] same patch, variable defined at the top.
when I said 'decoded' earlier I meant 'reported'
Looks fine. Please commit.
Checked in.