Error handling for invalid path

mindless - June 29, 2006 - 18:14
Project:Gallery
Version:5.x-2.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

Code in _gallery_init treats ERROR_MISSING_OBJECT to mean the user is not mapped into G2.. however, the same error is returned when URL rewrite is in use and an invalid path is given. Not sure if this is the best resolution, but the attached patch at least gets the right error into drupal watchdog for bad path.

AttachmentSize
gallery_init_patch.txt2.79 KB

#1

Signe - February 19, 2007 - 10:10
Version:4.7.x-1.x-dev» 5.x-1.x-dev
Priority:minor» critical

A much simpler solution. Don't attempt to create a G2 user for anonymous. This causes the Gallery module to return the standard G2 'path not found' error.

AttachmentSize
gallery_user.txt 590 bytes

#2

mindless - February 19, 2007 - 15:24

what if a non-guest accesses an invalid path?

#3

kiz_0987 - April 19, 2007 - 11:32
Priority:critical» normal
Status:needs review» needs work

Committed a modified version of this. Still does not work for logged in users, but certainly helps.

#4

profix898 - May 10, 2007 - 10:59
Version:5.x-1.x-dev» 5.x-2.x-dev
Status:needs work» fixed

As in the 5--2 branch the user sync does no longer happen in gallery_init(), this problem should be fixed. Invalid paths are handled in gallery_handle_request() now, this works for logged in users as well. (An admin will still see ERROR_MISSING_OBJECT, but its catched nicely and remains invisible for 'normal' users.)

#5

Anonymous - May 24, 2007 - 11:06
Status:fixed» closed
 
 

Drupal is a registered trademark of Dries Buytaert.