diff options
| author | roundcube <roundcube@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2006-02-19 18:34:34 +0000 |
|---|---|---|
| committer | roundcube <roundcube@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2006-02-19 18:34:34 +0000 |
| commit | 31abd72c2fa13e53a4d8070513cd0a313d2e5925 (patch) | |
| tree | 6365c81eec3ef9b81612fd8723025c4ba58d189e /roundcubemail/index.php | |
| parent | 487116d32e66d3fe7e5d4e015db9a03c03b3d1f4 (diff) | |
Applied several patches
git-svn-id: https://svn.roundcube.net/trunk@140 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/index.php')
| -rw-r--r-- | roundcubemail/index.php | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/roundcubemail/index.php b/roundcubemail/index.php index fd356c8ba..b3c372ebd 100644 --- a/roundcubemail/index.php +++ b/roundcubemail/index.php @@ -2,7 +2,7 @@ /* +-----------------------------------------------------------------------+ | RoundCube Webmail IMAP Client | - | Version 0.1-20060104 | + | Version 0.1b-20060219 | | | | Copyright (C) 2005, RoundCube Dev. - Switzerland | | Licensed under the GNU GPL | @@ -40,7 +40,7 @@ */ -define('RCMAIL_VERSION', '0.1-20060104'); +define('RCMAIL_VERSION', '0.1b-20060219'); // define global vars @@ -83,6 +83,23 @@ require_once('PEAR.php'); // PEAR::setErrorHandling(PEAR_ERROR_TRIGGER, E_USER_NOTICE); +// strip magic quotes from Superglobals... +if ((bool)get_magic_quotes_gpc()) // by "php Pest" + { + // Really EGPCSR - Environment $_ENV, GET $_GET , POST $_POST, Cookie $_COOKIE, Server $_SERVER + // and their HTTP_*_VARS cousins (separate arrays, not references) and $_REQUEST + $fnStripMagicQuotes = create_function( + '&$mData, $fnSelf', + 'if (is_array($mData)) { foreach ($mData as $mKey=>$mValue) $fnSelf($mData[$mKey], $fnSelf); return; } '. + '$mData = stripslashes($mData);' + ); + + // do each set of EGPCSR as you find necessary + $fnStripMagicQuotes($_POST, $fnStripMagicQuotes); + $fnStripMagicQuotes($_GET, $fnStripMagicQuotes); + } + + // catch some url/post parameters $_auth = !empty($_POST['_auth']) ? $_POST['_auth'] : $_GET['_auth']; $_task = !empty($_POST['_task']) ? $_POST['_task'] : (!empty($_GET['_task']) ? $_GET['_task'] : 'mail'); |
