Changeset 290 for trunk/gallery.php

Show
Ignore:
Timestamp:
12/19/05 11:45:01 (3 years ago)
Author:
anti
Message:

and a few more security fixes

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/gallery.php

    r270 r290  
    4545 
    4646// use plogger specific variables to avoid name clashes if Plogger is embedded 
     47 
     48 
     49 
    4750$GLOBALS['plogger_level'] = isset($_GET["level"]) ? $_GET["level"] : ''; 
    48 $GLOBALS['plogger_id'] = isset($_GET["id"]) ? $_GET["id"] : 0; 
     51$GLOBALS['plogger_id'] = isset($_GET["id"]) ? intval($_GET["id"]) : 0; 
    4952$GLOBALS['plogger_mode'] = isset($_GET["mode"]) ? $_GET["mode"] : ''; 
     53 
     54$allowed_levels = array('collections','collection','album','picture','search'); 
     55if (!in_array($GLOBALS['plogger_level'],$allowed_levels)) { 
     56        $GLOBALS['plogger_level'] = 'collections'; 
     57}; 
    5058 
    5159