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 339203 - gnome_vfs_format_uri_for_display should not show the password or a new function is needed.
gnome_vfs_format_uri_for_display should not show the password or a new functi...
Status: RESOLVED WONTFIX
Product: gnome-vfs
Classification: Deprecated
Component: URI handling
cvs (head)
Other All
: Normal normal
: ---
Assigned To: gnome-vfs maintainers
gnome-vfs maintainers
gnome[unmaintained]
Depends on:
Blocks:
 
 
Reported: 2006-04-20 16:14 UTC by Paolo Maggi
Modified: 2018-08-17 13:46 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Paolo Maggi 2006-04-20 16:14:00 UTC
Fixing bug #338173, I discovered that gnome_vfs_format_uri_for_display does not hide the password. May be it should hide it.

Another solution could be to add a new _without_password function (like the gedit_utils_format_uri_for_display one I created for gedit).
Comment 1 Murray Cumming 2006-06-19 08:10:53 UTC
Do you mean, for instance, the password in an ftp URI?
Comment 2 Christian Neumair 2006-06-19 17:09:59 UTC
According to attachment 63972 [details] [review] from bug 338173 gedit uses


{
		gchar *name;
		gchar *uri_for_display;
		
		name = gnome_vfs_uri_to_string (vfs_uri, GNOME_VFS_URI_HIDE_PASSWORD);
		g_return_val_if_fail (name != NULL, gnome_vfs_format_uri_for_display (uri));
		
		uri_for_display = gnome_vfs_format_uri_for_display (name);
		g_free (name);
		
		gnome_vfs_uri_unref (vfs_uri);
		
		return uri_for_display;
}

This is exactly how the API is meant to be used. Of course it requires an existing GnomeVFSURI, but does that really pose a problem?
Comment 3 Paolo Maggi 2006-06-20 08:39:26 UTC
Yes, I think it is a problem since every app will have to write a function like 
gedit_utils_format_uri_for_display that takes a string, generate a VFSURI, regenerate a new string without password and then format the uri for display.
I think showing a formatted uri without password is a more frequent use case than showing a formatted uri with the password.
So, in order to avoid code duplication, I sugget to:
- make clear in the documentation that gnome_vfs_format_uri_for_display does show the password (for example it was not clear to me before bug #338173 )
- add a _without_password variant of that function.

Murray: yes, I mean the password in a FTP/SMB/etc. URI

Comment 4 André Klapper 2018-08-17 13:46:34 UTC
gnome-vfs got deprecated in 2008.

gnome-vfs is not under active development anymore and had its last code changes
in 2011. Its codebase has been archived:
https://gitlab.gnome.org/Archive/gnome-vfs/commits/master

gio (in glib) and gvfs are its successors. See https://developer.gnome.org/gio/stable/ch33.html and https://people.gnome.org/~gicmo/gio-migration-guide/ for porting info.

Closing this report as WONTFIX as part of Bugzilla Housekeeping to reflect
reality. Feel free to open a task in GNOME Gitlab if the issue described in this task still applies to a recent + supported version of glib/gio/gvfs. Thanks!