Empty albums cause security violation

wildguy
wildguy's picture

Joined: 2007-09-04
Posts: 42
Posted: Wed, 2009-07-15 17:14

Hi

I'm using a custom built theme for gallery, and I get a security violation error when I attempt to access an empty album. My theme is based on Matrix and Siriux, although my understanding of what I'm doing exactly is limited, so it's likely this error is a mistake on my part. I have included all information that appears to be relevant to this issue. Any help is appreciated, thanks

Page error

Quote:
Security Violation

The action you attempted is not permitted.

Back to the Gallery

Error Detail -

Error (ERROR_BAD_PARAMETER)
in modules/core/classes/helpers/GalleryEntityHelper_simple.class at line 39 (GalleryCoreApi::error)
in modules/core/classes/GalleryCoreApi.class at line 2361 (GalleryEntityHelper_simple::loadEntitiesById)
in themes/wildsidegothic/theme.inc at line 160 (GalleryCoreApi::loadEntitiesById)
in modules/core/classes/GalleryTheme.class at line 932 (WildSideGothicTheme::showAlbumPage)
in themes/wildsidegothic/theme.inc at line 80 (GalleryTheme::loadTemplate)
in modules/core/classes/GalleryView.class at line 301 (WildSideGothicTheme::loadTemplate)
in main.php at line 465 (GalleryView::doLoadTemplate)
in main.php at line 104
in main.php at line 88

From theme.inc:

Quote:
/**
* @see GalleryTheme::showAlbumPage
*/
function showAlbumPage(&$template, $item, $params, $childIds) {

$params['pageWindowSize'] = 3;
$ret = $this->loadCommonTemplateData(
$template, $item, $params, array('owner', 'viewCount', 'childCount', 'descendentCount', 'parents', 'peers', 'systemLinks', 'itemLinks', 'itemSummaries', 'permissions', 'itemDetailFiles', 'thumbnails', 'pageNavigator', 'jumpRange'), $childIds);
if ($ret) {
return array($ret, null);
}

/* Add in our extra stuff */
$theme =& $template->getVariableByReference('theme');
$theme['columnWidthPct'] = floor(100 / $params['columns']);

/* Get custom fields */
list ($ret, $children) = GalleryCoreApi::loadEntitiesById($childIds);
if ($ret) {
return array($ret, null);
}

list ($ret, $theme['customFieldValues']) =
CustomFieldHelper::fetchFieldValues($children, 'detail');
if ($ret) {
return array($ret, null);
}

Smarty Console:
[img]http://thewildside.com/smarty.png[/img]

From debug output:

Quote:
Debug Output

file_exists(/mnt/local/home/thewildside/g2BETAdata/cache/module/_all/0/0/GalleryFactoryHelper_loadRegistry.inc) file_exists(/mnt/local/home/thewildside/betatest.thewildside.com/modules/rewrite/classes/parsers/modrewrite/ModRewriteUrlGenerator.class) getParameter modrewrite.galleryLocation for rewrite plugin file_exists(/mnt/local/home/thewildside/g2BETAdata/cache/module/rewrite/0/0/0.inc) getParameter shortUrls for rewrite plugin getParameter session.lifetime for core plugin file_exists(/mnt/local/home/thewildside/g2BETAdata/cache/module/core/0/0/0.inc) getParameter session.inactivityTimeout for core plugin
(mysqlt): ROLLBACK
(mysqlt): SET AUTOCOMMIT=1
(mysqlt): SET NAMES "utf8"
(mysqlt): SELECT g2_Schema.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
(mysqlt): SELECT g_userId, g_remoteIdentifier, g_creationTimestamp, g_modificationTimestamp, g_data FROM g2_SessionMap WHERE g_id='7f786ed8685d1183ad6c555bb051da00'
controller , view Loading plugin core Class not defined, trying to include it. file_exists(/mnt/local/home/thewildside/betatest.thewildside.com/modules/core/module.inc) core plugin successfully instantiated file_exists(/mnt/local/home/thewildside/g2BETAdata/versions.dat) file(/mnt/local/home/thewildside/g2BETAdata/versions.dat, ) getParameter id.rootAlbum for core plugin
(mysqlt): SELECT g2_FileSystemEntity.g_id FROM g2_FileSystemEntity, g2_ChildEntity WHERE g2_ChildEntity.g_parentId = 7 AND g2_ChildEntity.g_id = g2_FileSystemEntity.g_id AND g2_FileSystemEntity.g_pathComponent = 'auto'
(mysqlt): SELECT g2_FileSystemEntity.g_id FROM g2_FileSystemEntity, g2_ChildEntity WHERE g2_ChildEntity.g_parentId = 666 AND g2_ChildEntity.g_id = g2_FileSystemEntity.g_id AND g2_FileSystemEntity.g_pathComponent = 'test'
[1247677119] can't guarantee 5 -- extending! file_exists(/mnt/local/home/thewildside/g2BETAdata/cache/entity/0/0/6.inc) Loading plugin core core plugin successfully instantiated Check the version of the core plugin file_exists(/mnt/local/home/thewildside/g2BETAdata/cache/module/_all/0/0/GalleryPluginHelper_fetchPluginStatus.inc) The version of the core plugin is ok file_exists(/mnt/local/home/thewildside/betatest.thewildside.com/modules/core/ShowItem.inc) getParameter id.anonymousUser for core plugin getParameter id.adminGroup for core plugin
(mysqlt): SELECT g_userId FROM g2_UserGroupMap WHERE g_userId=6 AND g_groupId=3 LIMIT 1
getParameter id.anonymousUser for core plugin
(mysqlt): SELECT g2_Group.g_id, g2_Group.g_groupName FROM g2_UserGroupMap, g2_Group WHERE g2_Group.g_id = g2_UserGroupMap.g_groupId AND g2_UserGroupMap.g_userId = 5 ORDER BY g2_Group.g_groupName LIMIT 9223372036854775807
(mysqlt): SELECT g_module, g_permission, g_description, g_bits, g_flags FROM g2_PermissionSetMap
(mysqlt): SELECT DISTINCT g2_AccessMap.g_accessListId FROM g2_AccessMap WHERE g2_AccessMap.g_userOrGroupId IN (5,4) AND g2_AccessMap.g_permission & 1 = 1
(mysqlt): SELECT g_itemId FROM g2_AccessSubscriberMap WHERE g_itemId=50437 AND g_accessListId IN (42569,42766,42767,44525,49714,49716) LIMIT 1
file_exists(/mnt/local/home/thewildside/g2BETAdata/cache/entity/5/0/50437.inc)
(mysqlt): SELECT g2_Group.g_id, g2_Group.g_groupName FROM g2_UserGroupMap, g2_Group WHERE g2_Group.g_id = g2_UserGroupMap.g_groupId AND g2_UserGroupMap.g_userId = 6 ORDER BY g2_Group.g_groupName LIMIT 9223372036854775807
(mysqlt): SELECT DISTINCT g2_AccessMap.g_accessListId FROM g2_AccessMap WHERE g2_AccessMap.g_userOrGroupId IN (6,4,2,3) AND g2_AccessMap.g_permission & 1 = 1
(mysqlt): SELECT g_itemId FROM g2_AccessSubscriberMap WHERE g_itemId=50437 AND g_accessListId IN (42569,42766,42767,42769,43817,44195,44524,44525,49714,49715,49716) LIMIT 1
Loading plugin checkout Class not defined, trying to include it. file_exists(/mnt/local/home/thewildside/betatest.thewildside.com/modules/checkout/module.inc) checkout plugin successfully instantiated Loading plugin checkoutgroups Class not defined, trying to include it. file_exists(/mnt/local/home/thewildside/betatest.thewildside.com/modules/checkoutgroups/module.inc) checkoutgroups plugin successfully instantiated Loading plugin userinfo Class not defined, trying to include it. file_exists(/mnt/local/home/thewildside/betatest.thewildside.com/modules/userinfo/module.inc) userinfo plugin successfully instantiated getParameter default.theme for core plugin Loading plugin wildsidegothic Class not defined, trying to include it. file_exists(/mnt/local/home/thewildside/betatest.thewildside.com/themes/wildsidegothic/theme.inc) wildsidegothic plugin successfully instantiated Check the version of the wildsidegothic plugin file_exists(/mnt/local/home/thewildside/g2BETAdata/cache/theme/_all/0/0/GalleryPluginHelper_fetchPluginStatus.inc) The version of the wildsidegothic plugin is ok file_exists(/mnt/local/home/thewildside/g2BETAdata/cache/theme/wildsidegothic/0/0/0.inc) file_exists(/mnt/local/home/thewildside/g2BETAdata/cache/theme/wildsidegothic/5/0/50437.inc) file_exists(/mnt/local/home/thewildside/g2BETAdata/cache/theme/_all/localUrlMap.txt) file_exists(/mnt/local/home/thewildside/betatest.thewildside.com/modules/core/data/local/gallery.css)
(mysqlt): SELECT g_itemId FROM g2_AccessSubscriberMap WHERE g_itemId=50437 AND g_accessListId IN (42569,42766,42767,42769,43817,44195,44524,44525,49714,49715,49716) LIMIT 1
(mysqlt): SET AUTOCOMMIT=0
(mysqlt): BEGIN
(mysqlt): UPDATE g2_ItemAttributesMap SET g_viewCount = g2_ItemAttributesMap.g_viewCount + 1 WHERE g_itemId=50437
file_exists(/mnt/local/home/thewildside/betatest.thewildside.com/themes/local/wildsidegothic) getParameter misc.markup for core plugin file_exists(/mnt/local/home/thewildside/betatest.thewildside.com/modules/checkout/Preloads.inc) file_exists(/mnt/local/home/thewildside/betatest.thewildside.com/modules/customfield/Preloads.inc) file_exists(/mnt/local/home/thewildside/betatest.thewildside.com/modules/core/Preloads.inc) file_exists(/mnt/local/home/thewildside/betatest.thewildside.com/modules/whoisonline/Preloads.inc) file_exists(/mnt/local/home/thewildside/betatest.thewildside.com/modules/members/Preloads.inc) file_exists(/mnt/local/home/thewildside/betatest.thewildside.com/modules/core/Preloads.inc) file_exists(/mnt/local/home/thewildside/betatest.thewildside.com/modules/albumselect/Preloads.inc) file_exists(/mnt/local/home/thewildside/betatest.thewildside.com/modules/albumselect/local/dtree.css) Unimplemented: IconsInterface_1_0
(mysqlt): SELECT g2_ChildEntity.g_id, IF(ai0.g_id IS NULL, 1, 0) AS albumsFirst, g2_Item.g_originationTimestamp FROM g2_ChildEntity LEFT JOIN g2_AlbumItem AS ai0 ON g2_ChildEntity.g_id = ai0.g_id INNER JOIN g2_Item ON g2_ChildEntity.g_id = g2_Item.g_id INNER JOIN g2_AccessSubscriberMap ON g2_ChildEntity.g_id = g2_AccessSubscriberMap.g_itemId WHERE g2_ChildEntity.g_parentId = 50437 AND g2_AccessSubscriberMap.g_accessListId IN (42569,42766,42767,42769,43817,44195,44524,44525,49714,49715,49716) ORDER BY 2, g2_Item.g_originationTimestamp, g2_ChildEntity.g_id LIMIT 40
(mysqlt): SELECT g2_ChildEntity.g_parentId, COUNT(g2_ChildEntity.g_id) FROM g2_ChildEntity, g2_AccessSubscriberMap WHERE g2_ChildEntity.g_parentId IN (50437) AND g2_AccessSubscriberMap.g_itemId = g2_ChildEntity.g_id AND g2_AccessSubscriberMap.g_accessListId IN (42569,42766,42767,42769,43817,44195,44524,44525,49714,49715,49716) GROUP BY g2_ChildEntity.g_parentId
Loading plugin core core plugin successfully instantiated Check the version of the core plugin The version of the core plugin is ok
(mysqlt): SELECT g_parentSequence FROM g2_ItemAttributesMap WHERE g_itemId=50437
(mysqlt): SELECT g2_AccessSubscriberMap.g_itemId, BIT_OR(g2_AccessMap.g_permission) FROM g2_AccessMap, g2_AccessSubscriberMap WHERE g2_AccessSubscriberMap.g_itemId IN (7,666) AND g2_AccessSubscriberMap.g_accessListId = g2_AccessMap.g_accessListId AND g2_AccessMap.g_userOrGroupId IN (6,4,2,3) GROUP BY g2_AccessSubscriberMap.g_itemId
file_exists(/mnt/local/home/thewildside/g2BETAdata/cache/entity/0/0/7.inc) file_exists(/mnt/local/home/thewildside/g2BETAdata/cache/entity/6/6/666.inc)
(mysqlt): SELECT g_itemId, g_viewCount FROM g2_ItemAttributesMap WHERE g_itemId IN (50437)
(mysqlt): SELECT g2_ChildEntity.g_parentId, COUNT(g2_ChildEntity.g_id) FROM g2_ChildEntity, g2_AccessSubscriberMap WHERE g2_ChildEntity.g_parentId IN (50437) AND g2_AccessSubscriberMap.g_itemId = g2_ChildEntity.g_id AND g2_AccessSubscriberMap.g_accessListId IN (42569,42766,42767,42769,43817,44195,44524,44525,49714,49715,49716) GROUP BY g2_ChildEntity.g_parentId
(mysqlt): SELECT g_itemId, g_descendentCount FROM g2_DescendentCountsMap WHERE g_userId=6 AND g_itemId IN (50437)
(mysqlt): SELECT g2_AccessSubscriberMap.g_itemId, BIT_OR(g2_AccessMap.g_permission) FROM g2_AccessMap, g2_AccessSubscriberMap WHERE g2_AccessSubscriberMap.g_itemId IN (50437) AND g2_AccessSubscriberMap.g_accessListId = g2_AccessMap.g_accessListId AND g2_AccessMap.g_userOrGroupId IN (6,4,2,3) GROUP BY g2_AccessSubscriberMap.g_itemId
Loading plugin bulkmanage Class not defined, trying to include it. file_exists(/mnt/local/home/thewildside/betatest.thewildside.com/modules/bulkmanage/module.inc) bulkmanage plugin successfully instantiated Check the version of the bulkmanage plugin The version of the bulkmanage plugin is ok Loading plugin checkout checkout plugin successfully instantiated Check the version of the checkout plugin The version of the checkout plugin is ok getParameter id.adminGroup for core plugin getParameter alwaysShowAddToCart for checkout plugin file_exists(/mnt/local/home/thewildside/g2BETAdata/cache/module/checkout/0/0/0.inc) Loading plugin core core plugin successfully instantiated Check the version of the core plugin The version of the core 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 id.adminGroup for core plugin getParameter id.anonymousUser for core plugin getParameter id.rootAlbum for core plugin
(mysqlt): SELECT g2_ChildEntity.g_parentId, COUNT(g2_ChildEntity.g_id) FROM g2_ChildEntity, g2_AccessSubscriberMap WHERE g2_ChildEntity.g_parentId IN (50437) AND g2_AccessSubscriberMap.g_itemId = g2_ChildEntity.g_id AND g2_AccessSubscriberMap.g_accessListId IN (42569,42766,42767,42769,43817,44195,44524,44525,49714,49715,49716) GROUP BY g2_ChildEntity.g_parentId
(mysqlt): SELECT g2_Derivative.g_id, g2_ChildEntity.g_parentId FROM g2_Derivative, g2_ChildEntity WHERE g2_Derivative.g_id = g2_ChildEntity.g_id AND g2_ChildEntity.g_parentId IN (50437) AND g2_Derivative.g_derivativeType IN (1)
Loading plugin core core plugin successfully instantiated Check the version of the core plugin The version of the core plugin is ok getParameter misc.markup for core plugin Loading plugin customfield Class not defined, trying to include it. file_exists(/mnt/local/home/thewildside/betatest.thewildside.com/modules/customfield/module.inc) customfield plugin successfully instantiated Check the version of the customfield plugin The version of the customfield plugin is ok Loading plugin debug Class not defined, trying to include it. file_exists(/mnt/local/home/thewildside/betatest.thewildside.com/modules/debug/module.inc) debug plugin successfully instantiated Check the version of the debug plugin The version of the debug plugin is ok getParameter id.adminGroup for core plugin Loading plugin dynamicalbum Class not defined, trying to include it. file_exists(/mnt/local/home/thewildside/betatest.thewildside.com/modules/dynamicalbum/module.inc) dynamicalbum plugin successfully instantiated Check the version of the dynamicalbum plugin The version of the dynamicalbum plugin is ok file_exists(/mnt/local/home/thewildside/g2BETAdata/cache/module/dynamicalbum/0/0/0.inc) Loading plugin linksinthehead Class not defined, trying to include it. file_exists(/mnt/local/home/thewildside/betatest.thewildside.com/modules/linksinthehead/module.inc) linksinthehead plugin successfully instantiated Check the version of the linksinthehead plugin The version of the linksinthehead plugin is ok file_exists(/mnt/local/home/thewildside/g2BETAdata/cache/module/linksinthehead/0/0/0.inc) Loading plugin newitems Class not defined, trying to include it. file_exists(/mnt/local/home/thewildside/betatest.thewildside.com/modules/newitems/module.inc) newitems plugin successfully instantiated Check the version of the newitems plugin The version of the newitems plugin is ok Loading plugin register Class not defined, trying to include it. file_exists(/mnt/local/home/thewildside/betatest.thewildside.com/modules/register/module.inc) register plugin successfully instantiated Check the version of the register plugin The version of the register plugin is ok getParameter id.anonymousUser for core plugin Loading plugin replica Class not defined, trying to include it. file_exists(/mnt/local/home/thewildside/betatest.thewildside.com/modules/replica/module.inc) replica plugin successfully instantiated Check the version of the replica plugin The version of the replica plugin is ok Loading plugin rss Class not defined, trying to include it. file_exists(/mnt/local/home/thewildside/betatest.thewildside.com/modules/rss/module.inc) rss plugin successfully instantiated Check the version of the rss plugin The version of the rss plugin is ok file_exists(/mnt/local/home/thewildside/g2BETAdata/cache/module/rss/0/0/0.inc) getParameter id.adminGroup for core plugin getParameter acceleration for core plugin getParameter id.anonymousUser for core plugin getParameter id.adminGroup for core plugin getParameter default.theme for core plugin Loading plugin wildsidegothic wildsidegothic plugin successfully instantiated Check the version of the wildsidegothic plugin The version of the wildsidegothic 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 id.adminGroup for core plugin realpath(/mnt/local/home/thewildside/betatest.thewildside.com/modules/core/classes/../../../) realpath(/mnt/local/home/thewildside/betatest.thewildside.com/)
(mysqlt): SELECT g_mimeType, g_toolkitId, g_priority FROM g2_TkOperatnMimeTypeMap WHERE g_operationName='thumbnail' ORDER BY g_mimeType ASC, g_priority ASC
getParameter default.theme for core plugin Loading plugin wildsidegothic wildsidegothic plugin successfully instantiated Check the version of the wildsidegothic plugin The version of the wildsidegothic plugin is ok file_exists(/mnt/local/home/thewildside/g2BETAdata/smarty/templates_c/%%3126620272/wildsidegothic) is_dir(/mnt/local/home/thewildside/g2BETAdata/smarty/templates_c/%%3126620272/wildsidegothic) file_exists(/mnt/local/home/thewildside/g2BETAdata/smarty/templates_c/%%3126620272/wildsidegothic) is_writeable(/mnt/local/home/thewildside/g2BETAdata/smarty/templates_c/%%3126620272/wildsidegothic) file_exists(/mnt/local/home/thewildside/g2BETAdata/smarty/templates_c/%%3126620272/wildsidegothic/v_14) file_exists(/mnt/local/home/thewildside/betatest.thewildside.com/lib/javascript/local/BlockToggle.js) file_exists(/mnt/local/home/thewildside/betatest.thewildside.com/modules/core/../../themes/wildsidegothic/local/theme.css) file_exists(/mnt/local/home/thewildside/betatest.thewildside.com/themes/wildsidegothic/local/theme.css)

Gallery URL = http://betatest.thewildside.com/main.php
Gallery version = 2.3 core 1.3.0
API = Core 7.54, Module 3.9, Theme 2.6, Embed 1.5
PHP version = 5.2.6 cgi-fcgi
Webserver = Apache
Database = mysqlt 5.0.67-log, lock.system=flock
Toolkits = Gd, Thumbnail, ArchiveUpload, ImageMagick
Acceleration = full/21600, none/900
Operating system = Linux bonanno 2.6.24.5-serf-xeon-c6.1-grsec #1 SMP Tue Oct 7 06:18:04 PDT 2008 x86_64
Default theme = wildsidegothic
gettext = enabled
Locale = en_US
Browser = Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_7; en-us) AppleWebKit/530.19.2 (KHTML, like Gecko) Version/4.0.2 Safari/530.19
Rows in GalleryAccessMap table = 47
Rows in GalleryAccessSubscriberMap table = 2417
Rows in GalleryUser table = 74
Rows in GalleryItem table = 2410
Rows in GalleryAlbumItem table = 70
Rows in GalleryCacheMap table = 861

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Thu, 2009-07-16 02:10

try commenting out the returns from ret one at a time to see where the error is exactly.

Ha! I used to own thewilderside.com ages ago.

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

 
wildguy
wildguy's picture

Joined: 2007-09-04
Posts: 42
Posted: Fri, 2009-07-17 14:50
suprsidr wrote:
try commenting out the returns from ret one at a time to see where the error is exactly.

Ha! I used to own thewilderside.com ages ago.

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

Thanks for your help.... I was able to find the error.