Adding fix for Ticket #1272

Fixes exploit with XSS and DEBUG === 0

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@3362 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
phpnut 2006-08-05 22:59:01 +00:00
parent 0e527f46bf
commit 34651c4811

View file

@ -26,6 +26,7 @@
* @lastmodified $Date$
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
*/
uses('sanitize');
/**
* Short description for file.
*
@ -47,6 +48,8 @@ class ErrorHandler extends Object{
function __construct($method, $messages) {
parent::__construct();
static $__previousError = null;
$clean = new Sanitize();
$messages = $clean->paranoid($messages, array('.'));
$this->__dispatch =& new Dispatcher();
if ($__previousError != array($method, $messages)) {