Index: branches/5.2.x/core/kernel/db/cat_event_handler.php =================================================================== diff -u -N -r16692 -r16781 --- branches/5.2.x/core/kernel/db/cat_event_handler.php (.../cat_event_handler.php) (revision 16692) +++ branches/5.2.x/core/kernel/db/cat_event_handler.php (.../cat_event_handler.php) (revision 16781) @@ -1,6 +1,6 @@ session -> config -> 10) $object->SetPerPage($this->getPerPage($event)); - // main lists on Front-End have special get parameter for page - $page = $object->isMainList() ? $this->Application->GetVar('page') : false; + // Main lists on Front-End have special get parameter for page. + if ( $object->isMainList() ) { + $page = $this->Application->GetVarFiltered('page', false, FILTER_VALIDATE_INT); + } + else { + $page = false; + } if ( !$page ) { - // page is given in "env" variable for given prefix - $page = $this->Application->GetVar($event->getPrefixSpecial() . '_Page'); + // Page is given in "env" variable for given prefix. + $page = $this->Application->GetVarFiltered( + $event->getPrefixSpecial() . '_Page', + false, + FILTER_VALIDATE_INT + ); } if ( !$page && $event->Special ) { - // when not part of env, then variables like "prefix.special_Page" are - // replaced (by PHP) with "prefix_special_Page", so check for that too - $page = $this->Application->GetVar($event->getPrefixSpecial(true) . '_Page'); + /* + * When not part of env, then variables like "prefix.special_Page" are + * replaced (by PHP) with "prefix_special_Page", so check for that too. + */ + $page = $this->Application->GetVarFiltered( + $event->getPrefixSpecial(true) . '_Page', + false, + FILTER_VALIDATE_INT + ); } if ( !$object->isMainList() ) { @@ -1913,8 +1928,8 @@ if ( !$page ) { if ( $this->Application->RewriteURLs() ) { - // when page not found by prefix+special, then try to search it without special at all - $page = $this->Application->GetVar($event->Prefix . '_Page'); + // When page not found by prefix+special, then try to search it without special at all. + $page = $this->Application->GetVarFiltered($event->Prefix . '_Page', false, FILTER_VALIDATE_INT); if ( !$page ) { // page not found in request -> get from session