openrat-cms

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 99f8869a8c560b0fa71a99e3410eaafa33104425
parent c78aca2b488b27b8a49ac132c1bbc270b17cc0e3
Author: dankert <devnull@localhost>
Date:   Tue, 15 May 2007 01:29:06 +0200

Falls REGISTER_GLOBALS aktiviert ist, dann alle REQUEST-Variablen aus dem globalen G?ltigkeitsraum entfernen.

Diffstat:
functions/request.inc.php | 14+++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/functions/request.inc.php b/functions/request.inc.php @@ -20,7 +20,10 @@ // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // --------------------------------------------------------------------------- // $Log$ -// Revision 1.3 2004-12-19 21:16:43 dankert +// Revision 1.4 2007-05-14 23:29:06 dankert +// Falls REGISTER_GLOBALS aktiviert ist, dann alle REQUEST-Variablen aus dem globalen G?ltigkeitsraum entfernen. +// +// Revision 1.3 2004/12/19 21:16:43 dankert // Workaround, falls magic_quotes_gpc eingeschaltet ist // // Revision 1.2 2004/11/10 22:44:36 dankert @@ -35,6 +38,15 @@ $REQ = array_merge($HTTP_GET_VARS,$HTTP_POST_VARS,$_GET,$_POST); +// Zur Sicherheit: +// Falls REGISTER_GLOBALS aktiviert ist, dann alle REQUEST-Variablen aus dem +// globalen Gültigkeitsraum entfernen. +if ( ini_get('register_globals') ) +{ + foreach( $REQ as $reqVar=>$reqValue ) + unset( $$reqVar ); +} + if ( get_magic_quotes_gpc() == 1 ) { foreach( $REQ as $p=>$v )