Bug 195136 - Hard coded cookie name breaks compatibility with other API compatible back-ends
Summary: Hard coded cookie name breaks compatibility with other API compatible back-ends
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Plugin-WebService-Piwigo (show other bugs)
Version: unspecified
Platform: Ubuntu Unspecified
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-06-03 20:11 UTC by grugnog
Modified: 2023-02-25 09:23 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.0.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description grugnog 2009-06-03 20:11:11 UTC
Version:           0.2.0 (using KDE 4.2.2)
Installed from:    Ubuntu Packages

There are various applications that provide a G2 API compatible backend, to allow easy exporting of media using G2 compatible clients. I have been using the image_pub module for Drupal (http://drupal.org/project/image_pub) and have tested both the Drupal 5 and 6 versions and they both appear fully compatible with the Gallery Remote client.

When using the kipi galleryexport plugin however the session is not maintained, despite a successful login. Subsequent requests (e.g. to upload an image) are then met by an access denied message. This is the case when using either the "Gallery" or "Galley 2" modes.

After a bit of debugging I realised that the root cause is that galleryexport is only returning session cookies named GALLERYSID, whereas Drupal uses session cookies named SESS[and an MD5]. It is possible, although very inelegant, to change the global session name in Drupal to GALLERYSID - which fixes the issue and allows image uploads.

Assuming that GALLERYSID is not a requirement of the G2 API spec (which I believe is the case), I think the correct fix is to galleryexport. Ideally it should simply pass through all active cookies the same way as a browser does (I am guessing there is a library or simple function that could be used to do the bulk of the cookie string parsing/construction). Alternatively a temporary simple fix could be something like changing the cookie RegExp from "^GALLERYSID=.+" to something like "^[a-zA-Z0-9]+=.+" - however coling hinted on IRC that this could cause problems when multiple "SetCookie" headers are sent, so would need some testing.
Comment 1 grugnog 2009-06-03 20:21:21 UTC
Added a downstream ticket (for tracking/info) at http://drupal.org/node/481146
Comment 2 caulier.gilles 2011-12-22 13:15:59 UTC
Grugnog,

This file still valid using kipi-plugins 2.4 ?

Gilles Caulier
Comment 3 caulier.gilles 2012-09-21 07:52:59 UTC
Grugnog,

This file still valid using kipi-plugins 2.9 ?

Gilles Caulier
Comment 4 caulier.gilles 2015-05-19 10:18:48 UTC
Grugnog,

This file still valid using kipi-plugins 4.10.0 ?

Gilles Caulier
Comment 5 caulier.gilles 2015-06-29 17:53:06 UTC
New Kipiplugins 4.11.0 is available :

https://www.digikam.org/node/740

Can you reproduce the problem with this release ?

Gilles Caulier
Comment 6 caulier.gilles 2015-07-04 09:15:07 UTC
GalleryExport tool is not maintained since a while and Gallery project is dead.
Use PiwigoExport tool instead.
Gilles Caulier