mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-01 00:02:21 +09:00
Filter more potentially malicious tags in SVG uploads
This commit is contained in:
parent
b88fe65d6e
commit
901bdab6a9
1 changed files with 1 additions and 1 deletions
|
|
@ -93,7 +93,7 @@ class FileContentFilter
|
|||
*/
|
||||
protected static function _checkSVG($fp, $from, $to)
|
||||
{
|
||||
if (self::_matchStream('/<script|<handler\b|xlink:href\s*=\s*"(?!data:)/i', $fp, $from, $to))
|
||||
if (self::_matchStream('/(?:<|<)(?:script|iframe|foreignObject|object|embed|handler)|javascript:|xlink:href\s*=\s*"(?!data:)/i', $fp, $from, $to))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue