Version: 0.1.0-rc1 (using KDE KDE 3.5.1) Installed from: Compiled From Sources Compiler: gcc (GCC) 3.4.5 (Gentoo 3.4.5-r1, ssp-3.4.5-1.0, pie-8.7.9) -O3 -march=pentium4 -pipe OS: Linux I have develop a website based on PHPBB (including user/session management). In the website, I have develop a kind of gallery. I would create a interface for the kipi plugin copying the Gallery2 interface in order to use digikam to upload my photos. Unfortunatly, the Gallery authentification is based only on 1 cookie but PhpBB on 2 ones (phpbb_sid, phpbb_data). So the export does not work cause authentification. I think that a multiple cookie compatibility in kipiplugin should be interresting in order to increase the gallery systems compatibility with kipiplugins. So I have developed a correction to manage that (patch in the next comment). NOTE: as I said, I have based my work on the Gallery **2** interface. So the use of the patch (I developed) joined on the 96352 bug is needed. Hoping it can interest someone...
Created attachment 14976 [details] Patch in order to kipi plugin manage several authentification cookies Here, the correction patch
above patch should resolv change request.
keep it open untill applied to svn/rejected ;-)
Sorry, I am newbee in the bug following projects :o) I know that this functionnality has not a lot of interest for the first goal (ie. interation with Gallery) but I think it was a great thing if, in the future, the integration can expend to another gallery systems. Waiting your point of view. At your disposition.
I am currently developing a competitor to Gallery and a KIPI pluggin for it. My recommendation would be to either implement the Gallery API exactly, or to fork the Pluggin and make a couple changes. In your case, I would imagine the simplest would be to create a proxy to handle this one cookie and trade in for two, essentially making a compatible system.
OTOH, considering this patch as an enhancement, would there be any backwards compatibility issues?
No backward compatibility (at least, considering what I saw). I am currently using the kipi plugins with this patch with both of Gallery and my PhpBB script. So it manages in the same way one or two (and normaly more) cookie(s).
Please Col can you check this and the patch they provide?
SVN commit 547984 by cguthrie: Add support for multiple cookies by commiting a slightly modified patch. Tested on G1/G2 for a single cookie environment. Please reopen if my variation on the patch in some way doesn't work for you. BUG: 123141 M +9 -7 gallerytalker.cpp --- trunk/extragear/libs/kipi-plugins/galleryexport/gallerytalker.cpp #547983:547984 @@ -23,6 +23,7 @@ #include <qtextstream.h> #include <qfile.h> #include <qimage.h> +#include <qregexp.h> #include <klocale.h> #include <kio/job.h> @@ -299,13 +300,14 @@ if (m_state == GE_LOGIN && m_loggedIn) { - // get and parse the cookie - m_cookie = job->queryMetaData("setcookies"); - // rfc2109: http://www.faqs.org/rfcs/rfc2109.html - m_cookie.remove("Set-Cookie:"); - m_cookie = m_cookie.section(";", 0, 0); - m_cookie = "Cookie:" + m_cookie; - + QStringList cookielist = QStringList::split("\n", job->queryMetaData("setcookies")); + m_cookie = "Cookie:"; + for (QStringList::Iterator it = cookielist.begin(); it != cookielist.end(); ++it) + { + QRegExp rx("^Set-Cookie: ([^;]+)"); + if (rx.search(*it) > -1) + m_cookie += " " + rx.cap(1) + ";"; + } listAlbums(); } }
It works perfectly for me. Thanks you very much!