Personal tools

Talk:Downloads:Galleryadd.pl NG

From Gallery Codex

Contents

Descriptions for individual images

Is it possible to specify descriptions for individual images with this? If not, how could that be done programmatically? Dori 20:55, 8 July 2006 (PDT)

Please ask questions in the forums. --Dmolavi 09:03, 9 July 2006 (PDT)

Gallery Version

I believe that it should have gallery_version=2 as default --Mrwoody 07:51, 13 November 2007 (PST)


Possible Bug ?

Using Linux, I am experiencing the same problem as this one:

http://gallery.menalto.com/node/67625

His solution works here, but of course it is not ideal. --Mrwoody 07:53, 13 November 2007 (PST)

Won't work with Gallery 2.2 because of security restriction

Gallery 2.2 has some extra security checks to prevent forgery. There is a backwards-compatible hack to support Gallery Remote and iPhotoToGallery. If you want galleryadd.pl to work, you'll have to add the following line to modules/remote/GalleryRemote.inc:

...

               /* Backwards-compatible request-forgery protection based on the user-agent string */
               $httpUserAgent = GalleryUtilities::getServerVar('HTTP_USER_AGENT');
               if (strstr($httpUserAgent, 'Gallery Remote') === false
                       && strstr($httpUserAgent, 'RPT-HTTPClient') === false
                       && strstr($httpUserAgent, 'iPhotoToGallery')=== false

&& strstr($httpUserAgent, 'libwww-perl') === false)

               {
                   /* Newer GalleryRemote versions handle auth tokens */
                   $ret = GalleryController::assertIsGenuineRequest();
                   if ($ret) {
                       $gallery->debug('Unrecognized User Agent NJM: '  . $httpUserAgent);
                       return array(GalleryCoreApi::error(ERROR_REQUEST_FORGED), null);
                   }
               }

...

This obviously opens up a big security hole so use this at your own risk. --Nmccurdy 18:32, 6 August 2008 (UTC)

advertisements