[Maps] Security Violation on entering coordinates [SOLVED]

swordfish
swordfish's picture

Joined: 2004-10-01
Posts: 388
Posted: Wed, 2007-07-04 04:16

I'm using Gmap from SVN, revision 252. When attempting to set the lat/long coordinates for an image and then clicking 'save' I get the below security error.
Same error occurs when not using embedded mode with Wordpress WPG2 2.13 plugin.

Any ideas what might be the problem?

Security Violation

The action you attempted is not permitted.

Back to the Gallery
Error Detail -
Error (ERROR_BAD_PARAMETER) : Controller results are missing status, error, (redirect, delegate, return)

    * in main.php at line 265 (gallerycoreapi::error)
    * in main.php at line 111
    * in modules/core/classes/GalleryEmbed.class at line 179
    * in /var/www/localhost/htdocs/blog/wp-gallery2.php at line 48 (galleryembed::handlerequest) 

Not using Embedded mode I get:

Security Violation

The action you attempted is not permitted.

Back to the Gallery
Error Detail -
Error (ERROR_BAD_PARAMETER) : Controller results are missing status, error, (redirect, delegate, return)

    * in main.php at line 265 (gallerycoreapi::error)
    * in main.php at line 111
    * in main.php at line 96

System Information:

Gallery version = 2.3-svn core 1.2.18
API = Core 7.33, Module 3.7, Theme 2.6, Embed 1.2
PHP version = 4.4.7-pl0-gentoo apache2handler
Webserver = Apache
Database = mysql 4.0.27, lock.system=flock
Toolkits = NetPBM, ArchiveUpload, Gd, Exif, Dcraw, ImageMagick, jpegtran, Ffmpeg, Thumbnail
Acceleration = full/900, full/900
Operating system = Linux digi-archive 2.6.20-gentoo-r8 #1 SMP Sun May 6 21:29:21 PDT 2007 i686
Default theme = PGtheme
gettext = enabled
Locale = en_US
Browser = Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.4) Gecko/20070515 Firefox/2.0.0.4
Rows in GalleryAccessMap table = 309
Rows in GalleryAccessSubscriberMap table = 3529
Rows in GalleryUser table = 8
Rows in GalleryItem table = 3499
Rows in GalleryAlbumItem table = 105
Rows in GalleryCacheMap table = 258

 
SiliconFiend
SiliconFiend's picture

Joined: 2006-12-27
Posts: 508
Posted: Thu, 2007-07-05 20:00

I'll look into it. It looks like the API changed for Gallery2-SVN in what it's expecting from Controller classes. Hopefully I can make it work with 2.1 through 2.3. Otherwise you'll have to wait until we release the last 2.1-compatible version, then I'll make the change in SVN.

 
swordfish
swordfish's picture

Joined: 2004-10-01
Posts: 388
Posted: Thu, 2007-07-05 20:31

@SiliconFiend,

Ok, thanks for the follow-up!

 
SiliconFiend
SiliconFiend's picture

Joined: 2006-12-27
Posts: 508
Posted: Fri, 2007-07-06 04:49

Okay, I poked around with this a bit. The good news is that it's not a problem with Gallery 2.3 (SVN). The bad news is that I can't reproduce it, and I can't see an execution path that would get you to that error. You might try re-copying the map module. Or, turn on buffered debugging in your config.php and see what you get when you click Save these coordinates (it should pause on an intermediate page before returning to the item edit page).

 
swordfish
swordfish's picture

Joined: 2004-10-01
Posts: 388
Posted: Sat, 2007-07-07 01:07

Tried re-copying the map module and same error persists.
Below is the debug output:

file_exists(/var/www/localhost/g2data/cache/module/_all/0/0/GalleryFactoryHelper_loadRegistry.inc) file_exists(/var/www/localhost/htdocs/gallery2/modules/rewrite/classes/parsers/modrewrite/ModRewriteUrlGenerator.class) getParameter modrewrite.embeddedLocation for rewrite plugin file_exists(/var/www/localhost/g2data/cache/module/rewrite/0/0/0.inc) getParameter cookie.path for core plugin file_exists(/var/www/localhost/g2data/cache/module/core/0/0/0.inc) getParameter shortUrls for rewrite plugin getParameter session.lifetime for core plugin getParameter session.inactivityTimeout for core plugin (mysql): SELECT g2_PluginMap.g_pluginId, g2_PluginMap.g_active FROM g2_PluginMap WHERE g2_PluginMap.g_pluginType = 'module'   (mysql): SELECT g_info FROM g2_PluginMap, g2_Schema WHERE g2_PluginMap.g_pluginId = g2_Schema.g_pluginId AND g2_Schema.g_type = 'map' AND g2_PluginMap.g_active = 1   (mysql): SELECT g_userId, g_remoteIdentifier, g_creationTimestamp, g_modificationTimestamp, g_data FROM g2_SessionMap WHERE g_id='545ff46afafdfda32a16ab2e4cecbe87'   (mysql): SELECT g_entityId FROM g2_ExternalIdMap WHERE g_externalId='1' AND g_entityType='GalleryUser'   (mysql): SELECT g_entityId FROM g2_ExternalIdMap WHERE g_externalId='1' AND g_entityType='GalleryUser'   [1183769981] can't guarantee 5 -- extending! file_exists(/var/www/localhost/g2data/cache/entity/0/0/5.inc) (mysql): SELECT g_entityId FROM g2_ExternalIdMap WHERE g_externalId='1' AND g_entityType='GalleryUser'   (mysql): SELECT g_entityId FROM g2_ExternalIdMap WHERE g_externalId='1' AND g_entityType='GalleryUser'   getParameter id.adminGroup for core plugin (mysql): SELECT g_userId FROM g2_UserGroupMap WHERE g_userId=5 AND g_groupId=2 LIMIT 1   controller map.ShowMap, view Loading plugin core Class not defined, trying to include it. file_exists(/var/www/localhost/htdocs/gallery2/modules/core/module.inc) core plugin successfully instantiated file_exists(/var/www/localhost/g2data/versions.dat) file(/var/www/localhost/g2data/versions.dat, ) Loading plugin map Class not defined, trying to include it. file_exists(/var/www/localhost/htdocs/gallery2/modules/map/module.inc) map plugin successfully instantiated Check the version of the map plugin file_exists(/var/www/localhost/g2data/cache/module/_all/0/0/GalleryPluginHelper_fetchPluginStatus.inc) The version of the map plugin is ok file_exists(/var/www/localhost/htdocs/gallery2/modules/map/ShowMap.inc) Loading plugin map map plugin successfully instantiated Check the version of the map plugin The version of the map plugin is ok (mysql): SELECT g_info FROM g2_Schema WHERE g2_Schema.g_type = 'map'   Loading plugin comment Class not defined, trying to include it. file_exists(/var/www/localhost/htdocs/gallery2/modules/comment/module.inc) comment plugin successfully instantiated Loading plugin customfield Class not defined, trying to include it. file_exists(/var/www/localhost/htdocs/gallery2/modules/customfield/module.inc) customfield plugin successfully instantiated Loading plugin imageblock Class not defined, trying to include it. file_exists(/var/www/localhost/htdocs/gallery2/modules/imageblock/module.inc) imageblock plugin successfully instantiated Loading plugin thumbnail Class not defined, trying to include it. file_exists(/var/www/localhost/htdocs/gallery2/modules/thumbnail/module.inc) thumbnail plugin successfully instantiated Loading plugin thumbpage Class not defined, trying to include it. file_exists(/var/www/localhost/htdocs/gallery2/modules/thumbpage/module.inc) thumbpage plugin successfully instantiated Loading plugin watermark Class not defined, trying to include it. file_exists(/var/www/localhost/htdocs/gallery2/modules/watermark/module.inc) watermark plugin successfully instantiated Loading plugin albumselect Class not defined, trying to include it. file_exists(/var/www/localhost/htdocs/gallery2/modules/albumselect/module.inc) albumselect plugin successfully instantiated Loading plugin multilang Class not defined, trying to include it. file_exists(/var/www/localhost/htdocs/gallery2/modules/multilang/module.inc) multilang plugin successfully instantiated Loading plugin rewrite Class not defined, trying to include it. file_exists(/var/www/localhost/htdocs/gallery2/modules/rewrite/module.inc) rewrite plugin successfully instantiated Loading plugin sizelimit Class not defined, trying to include it. file_exists(/var/www/localhost/htdocs/gallery2/modules/sizelimit/module.inc) sizelimit plugin successfully instantiated Loading plugin map map plugin successfully instantiated Loading plugin core core plugin successfully instantiated getParameter default.theme for core plugin Loading plugin PGtheme Class not defined, trying to include it. file_exists(/var/www/localhost/htdocs/gallery2/themes/PGtheme/theme.inc) PGtheme plugin successfully instantiated Check the version of the PGtheme plugin file_exists(/var/www/localhost/g2data/cache/theme/_all/0/0/GalleryPluginHelper_fetchPluginStatus.inc) The version of the PGtheme plugin is ok Loading plugin core core plugin successfully instantiated Check the version of the core plugin The version of the core plugin is ok getParameter smarty.compile_check for core plugin getParameter id.adminGroup for core plugin realpath(/var/www/localhost/htdocs/gallery2/modules/core/classes/../../../) realpath(/var/www/localhost/htdocs/gallery2/) (mysql): SELECT g_mimeType, g_toolkitId, g_priority FROM g2_TkOperatnMimeTypeMap WHERE g_operationName='thumbnail' ORDER BY g_mimeType ASC, g_priority ASC   file_exists(/var/www/localhost/g2data/smarty/templates_c/%%2408687803) is_dir(/var/www/localhost/g2data/smarty/templates_c/%%2408687803) file_exists(/var/www/localhost/g2data/smarty/templates_c/%%2408687803) is_writeable(/var/www/localhost/g2data/smarty/templates_c/%%2408687803) file_exists(/var/www/localhost/g2data/smarty/templates_c/%%2408687803/v_13) file_exists(/var/www/localhost/g2data/cache/theme/_all/localUrlMap.txt) file_exists(/var/www/localhost/htdocs/gallery2/lib/javascript/local/BlockToggle.js) file_exists(/var/www/localhost/htdocs/gallery2/modules/core/../../themes/PGtheme/local/theme.css)
 
swordfish
swordfish's picture

Joined: 2004-10-01
Posts: 388
Posted: Sat, 2007-07-07 02:47

@SiliconFiend,

Never mind, problem solved. "Somehow" the Gmaps database name changed from g2_mapMap to g2_mapmap.
I'd still be lost w/o phpMyAdmin :-).

 
SiliconFiend
SiliconFiend's picture

Joined: 2006-12-27
Posts: 508
Posted: Sat, 2007-07-07 15:42

So, did you change the table name, or is it a bug I need to hunt down? I'm nervous because I did make a couple changes from "Map" to "map" recently, but those were all in the phpdoc comments and I don't think those should filter through to the actual code.

 
swordfish
swordfish's picture

Joined: 2004-10-01
Posts: 388
Posted: Sat, 2007-07-07 23:17

No, I didn't change the table name. Perhaps on an earlier Gmaps svn update I did this was a bug. I did go through some of latest src code and didn't find any "mapmap" reference excluding code comments. What you might want to check is after you install/configure maps, then deactivate and uninstall the module. Then reinstall, configure and activate. What happens to the g2_mapMap db table??

Aside from this I may have been bitten by my php cache during a svn update as I use Eaccelerator.

 
SiliconFiend
SiliconFiend's picture

Joined: 2006-12-27
Posts: 508
Posted: Sun, 2007-07-08 00:18

Uninstalling the module is supposed to delete any associated database tables.

What was the first version of the map module you installed?

 
swordfish
swordfish's picture

Joined: 2004-10-01
Posts: 388
Posted: Sun, 2007-07-08 02:32

Heheh, who knows. I been using this map module for years and often update.

 
SiliconFiend
SiliconFiend's picture

Joined: 2006-12-27
Posts: 508
Posted: Mon, 2007-07-09 22:44

Well, I poked around the SVN repository and the oldest stuff I could find had mapMap, so I can't figure out where the "mapmap" might have come from (it was in CVS before it was in SVN, and that history was not migrated to subversion). If it's something I did recently (I don't know how, though), I'll find out soon enough if more people start reporting problems.