mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-03-12 20:49:50 +00:00
Changing Sanitize::cleanValue() to enforce replacement of \r and \n with \n
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4033 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
e712f87fc0
commit
e42a93c639
1 changed files with 2 additions and 3 deletions
|
@ -208,10 +208,9 @@ class Sanitize{
|
|||
$val = str_replace(chr(0xCA), "", $val);
|
||||
//Encode any HTML to entities.
|
||||
$val = $this->html($val);
|
||||
//Double-check special chars and remove carriage returns
|
||||
//For increased SQL security
|
||||
//Double-check special chars and replace carriage returns with new lines
|
||||
$val = preg_replace("/\\\$/", "$", $val);
|
||||
$val = preg_replace("/\r\n/", "", $val);
|
||||
$val = preg_replace("/\r\n/", "\n", $val);
|
||||
$val = str_replace("!", "!", $val);
|
||||
$val = str_replace("'", "'", $val);
|
||||
//Allow unicode (?)
|
||||
|
|
Loading…
Add table
Reference in a new issue