Security fixes

This commit is contained in:
RainLoop Team 2014-07-02 17:11:43 +04:00
parent 12a2f324b2
commit 34ab65fc80
3 changed files with 33 additions and 5 deletions

View file

@ -1043,8 +1043,19 @@ class Utils
*/
public static function ClearFileName($sFileName)
{
return \preg_replace('/[\s]+/', ' ',
\str_replace(array('"', '/', '\\', '*', '?', '<', '>', '|', ':'), ' ', $sFileName));
return \MailSo\Base\Utils::ClearNullBite(\preg_replace('/[\s]+/', ' ',
\str_replace(array('"', '/', '\\', '*', '?', '<', '>', '|', ':'), ' ', $sFileName)));
}
/**
* @param string $sValue
*
* @return string
*/
public static function ClearXss($sValue)
{
return \MailSo\Base\Utils::ClearNullBite(
\str_replace(array('"', '/', '\\', '*', '?', '<', '>', '|', ':'), ' ', $sValue));
}
/**