GNOME Bugzilla – Bug 314125
HTTP authentication should be added to the Gallery export
Last modified: 2018-07-12 00:03:24 UTC
There's a small but (in some cases, such as mine) important feature missing in the Gallery export module - it doesn't seem to support HTTP authentication at all. The Gallery I intend to use f-spot with is secured with .htaccess (as described on http://gallery.menalto.com/modules.php?op=modload&name=GalleryDocs&file=index&page=gallery1-admin.securing.php), so when I try to log on to the gallery, f-spot should pop up a dialog asking for the username and password for the basic HTTP authentication, just like a web browser would do and like Gallery Remote does in such cases. Now it just tells (with a pop up) that there's been an error connecting to the gallery and asks me to verify that the settings are correct. It could also be implemented by letting the user type the username and the password straight to the url (http://username:password@example.com (tried this approach with the Gallery in question, doesn't work)) or add an additional pair of fields to the connect dialog, but in this case a pop-up would probably be the most straight forward and stylish option.
I guess that implementing this would require the use of some external library which provides the HTTP authentication. I was wondering whether Gnome VFS could somehow be used here...
Is this still a problem in latest f-spot?
Unfortunately I don't have access to that particular Gallery - or any other .htaccess protected Gallery, for that matter. I could set up one just for testing though.
If you can, that would be great. :)
I also have a Gallery2 in an .htaccess-protected directory, and can't convince F-Spot to export to it. In fact, F-Spot crashes for me when trying to setup the Web Gallery. When I remove .htaccess protection from the Gallery, though, it works fine. Unfortunately that's not an option as I don't want to expose family photos to the world at large. Trying to setup initial Web Gallery export: $ f-spot Starting new FSpot server Reloading item changed (f-spot:12824): GdkPixbuf-WARNING **: GdkPixbufLoader finalized without calling gdk_pixbuf_loader_close() - this is not allowed. You must explicitly end the data stream to the loader before dropping the last reference. error checking orientation Detecting Gallery version Detected: VersionUnknown Detecting Gallery version Detected: VersionUnknown Exception in Gtk# callback delegate Note: Applications can use GLib.ExceptionManager.UnhandledException to handle the exception. System.Exception: Cannot connect to a Gallery for which the version is unknown at G2Export.GalleryAccount.Connect () [0x00000] at G2Export.AccountDialog.HandleAddResponse (System.Object sender, Gtk.ResponseArgs args) [0x00000] at Gtk.Dialog.ResponseSignalCallback (IntPtr arg0, Int32 arg1, IntPtr gch) [0x00000] at GLib.ExceptionManager.RaiseUnhandledException(System.Exception e, Boolean is_terminal) at Gtk.Dialog.ResponseSignalCallback(IntPtr arg0, Int32 arg1, IntPtr gch) at Gtk.Dialog.ResponseSignalCallback(IntPtr , Int32 , IntPtr ) at Gtk.Application.gtk_main() at Gtk.Application.gtk_main() at Gtk.Application.Run() at Gnome.Program.Run() at FSpot.Driver.Main(System.String[] args) Then I temporarily removed .htaccess protection from the Gallery, set it up in F-Spot, exited, modified the URL ~/.gnome2/f-spot/Accounts.xml to include the username and pw ("http://user:pw@url"), restored .htaccess protection, and tried again. But no go: $ f-spot Starting new FSpot server Reloading item changed (f-spot:13306): GdkPixbuf-WARNING **: GdkPixbufLoader finalized without calling gdk_pixbuf_loader_close() - this is not allowed. You must explicitly end the data stream to the loader before dropping the last reference. error checking orientation Gallery created: GalleryRemote.Gallery2 Gallery2: Attempting to login System.Net.WebException: Unhandled exception ---> System.Net.WebException: The remote server returned an error: (401) Authorization Required. at System.Net.HttpWebRequest.CheckFinalStatus (System.Net.WebAsyncResult result) [0x00000] at System.Net.HttpWebRequest.SetResponseData (System.Net.WebConnectionData data) [0x00000] --- End of inner exception stack trace --- at FSpot.FormClient.Submit (System.Uri uri, FSpot.ProgressItem progress_item) [0x00000] at FSpot.FormClient.Submit (System.Uri uri) [0x00000] at GalleryRemote.Gallery2.Login (System.String username, System.String passwd) [0x00000] at G2Export.GalleryAccount.Connect () [0x00000] at G2Export.GalleryExport.Connect (G2Export.GalleryAccount selected) [0x00000] This is F-spot 0.4.3.1 on Ubuntu 8.04 with Gallery 2.2.5.
Just for anyone in the same boat, a workaround: I modified .htaccess to allow password-free access from my IP address. I have a dynamic IP, so I need to keep doing this, but at least I can export to Gallery without removing password protection from the site altogether. See example here: http://httpd.apache.org/docs/1.3/howto/auth.html#satisfy
That's a workaround for a personal Gallery, but in my case the Gallery is (or was, I no longer have access to it) used by dozens of people, so IP address "authentication" is not an option. I'll bump the version to 0.4.x since it still is reproducible.
*** Bug 569686 has been marked as a duplicate of this bug. ***
F-Spot has moved to https://github.com/f-spot/f-spot/issues If this Bugzilla ticket is still valid in a recent version of F-Spot, please feel free to post this topic as a ticket in the F-Spot project on GitHub. Closing this report as WONTFIX as part of Bugzilla Housekeeping as we are planning to shut down GNOME Bugzilla in favor of GNOME Gitlab.