Authentication Failure in Embedded Gallery

kiiadi

Joined: 2009-06-22
Posts: 9
Posted: Sat, 2009-07-04 23:36

Getting the following error when trying to perform some admin tasks through WP to my embedded Gallery installation (ie: renaming an item). Works fine when I go directly to the Gallery URL but not via WP. Not sure what the issue could be ... I've done a search of the forum and there's a few that get the "Authentication Failure" error but couldnt' find any with similar error detail.

Authentication Failure

Your change cannot be completed due to a loss of session data. Please try again. If it still doesn't work, try logging out and logging back in.

Back to the Gallery
Error Detail -
Error (ERROR_REQUEST_FORGED)

* in modules/core/classes/GalleryController.class at line 239 (GalleryCoreApi::error)
* in main.php at line 243 (GalleryController::assertIsGenuineRequest)
* in main.php at line 104
* in modules/core/classes/GalleryEmbed.class at line 189
* in /xxxxxxxxxxxx/wordpress/wp-content/plugins/wpg2/wpg2template.inc at line 76 (GalleryEmbed::handleRequest)
* in ??? at line 0
* in /xxxxxxxxxxxx/wordpress/wp-includes/plugin.php at line 339
* in /xxxxxxxxxxxx/wordpress/wp-includes/template-loader.php at line 7
* in /xxxxxxxxxxxx/wordpress/wp-blog-header.php at line 16
* in /xxxxxxxxxxxx/wordpress/index.php at line 17

System Information
Gallery version 2.3
PHP version 5.2.4-2ubuntu5.6 apache2handler
Webserver Apache/2.2.8 (Ubuntu) DAV/2 SVN/1.5.1 mod_python/3.3.1 Python/2.5.2 PHP/5.2.4-2ubuntu5.6 with Suhosin-Patch
Database mysqli 5.0.51a-3ubuntu5.4
Toolkits SquareThumb, ImageMagick, Thumbnail, NetPBM
Operating system Linux coxian.org 2.6.24.5-grsec-xxxx-grs-ipv4-32 #3 SMP Wed May 28 09:09:25 CEST 2008 i686
Browser Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv:1.9.0.11) Gecko/2009060214 Firefox/3.0.11

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Sun, 2009-07-05 14:55

try adding

    if (! isset ($authToken)) {
        $session = & $gallery->getSession();
        $authToken = $session->getAuthToken();
        GalleryUtilities::putRequestVariable('authToken', $authToken);
    }

just before line 76 in /xxxxxxxxxxxx/wordpress/wp-content/plugins/wpg2/wpg2template.inc

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2