mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Relaxing Sanitization on error messages to prevent UTF-8 characters from being stripped. Closes #5133
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7352 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
d9bb166721
commit
71634b6b1d
1 changed files with 2 additions and 6 deletions
|
@ -74,12 +74,8 @@ class ErrorHandler extends Object {
|
||||||
App::import('Core', 'Sanitize');
|
App::import('Core', 'Sanitize');
|
||||||
|
|
||||||
$this->controller =& new CakeErrorController();
|
$this->controller =& new CakeErrorController();
|
||||||
$allow = array('.', '/', '_', ' ', '-', '~');
|
$options = array('escape' => false);
|
||||||
|
$messages = Sanitize::clean($messages, $options);
|
||||||
if (substr(PHP_OS, 0, 3) == "WIN") {
|
|
||||||
$allow = array_merge($allow, array('\\', ':'));
|
|
||||||
}
|
|
||||||
$messages = Sanitize::paranoid($messages, $allow);
|
|
||||||
|
|
||||||
if (!isset($messages[0])) {
|
if (!isset($messages[0])) {
|
||||||
$messages = array($messages);
|
$messages = array($messages);
|
||||||
|
|
Loading…
Reference in a new issue