Skip to content

Commit

Permalink
Fixed a few diffs that were caused by my IDE.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mathewlenning committed Mar 6, 2015
1 parent 02ca083 commit d5d54fe
Showing 1 changed file with 32 additions and 33 deletions.
65 changes: 32 additions & 33 deletions libraries/joomla/filter/input.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,28 +74,28 @@ class JFilterInput
* @since 11.1
*/
public $tagBlacklist = array(
'applet',
'body',
'bgsound',
'base',
'basefont',
'embed',
'frame',
'frameset',
'head',
'html',
'id',
'iframe',
'ilayer',
'layer',
'link',
'meta',
'name',
'object',
'script',
'style',
'title',
'xml'
'applet',
'body',
'bgsound',
'base',
'basefont',
'embed',
'frame',
'frameset',
'head',
'html',
'id',
'iframe',
'ilayer',
'layer',
'link',
'meta',
'name',
'object',
'script',
'style',
'title',
'xml'
);

/**
Expand All @@ -105,11 +105,11 @@ class JFilterInput
* @since 11.1
*/
public $attrBlacklist = array(
'action',
'background',
'codebase',
'dynsrc',
'lowsrc'
'action',
'background',
'codebase',
'dynsrc',
'lowsrc'
);

/**
Expand Down Expand Up @@ -315,8 +315,8 @@ public static function checkAttribute($attrSubSet)
$attrSubSet[1] = strtolower($attrSubSet[1]);

return (((strpos($attrSubSet[1], 'expression') !== false) && ($attrSubSet[0]) == 'style') || (strpos($attrSubSet[1], 'javascript:') !== false) ||
(strpos($attrSubSet[1], 'behaviour:') !== false) || (strpos($attrSubSet[1], 'vbscript:') !== false) ||
(strpos($attrSubSet[1], 'mocha:') !== false) || (strpos($attrSubSet[1], 'livescript:') !== false));
(strpos($attrSubSet[1], 'behaviour:') !== false) || (strpos($attrSubSet[1], 'vbscript:') !== false) ||
(strpos($attrSubSet[1], 'mocha:') !== false) || (strpos($attrSubSet[1], 'livescript:') !== false));
}

/**
Expand Down Expand Up @@ -598,9 +598,9 @@ protected function _cleanAttributes($attrSet)
// AND blacklisted attributes

if ((!preg_match('/[a-z]*$/i', $attrSubSet[0]))
|| (($this->xssAuto) && ((in_array(strtolower($attrSubSet[0]), $this->attrBlacklist))
|| (substr($attrSubSet[0], 0, 2) == 'on')))
|| !isset($attrSubSet[1]))
|| (($this->xssAuto) && ((in_array(strtolower($attrSubSet[0]), $this->attrBlacklist))
|| (substr($attrSubSet[0], 0, 2) == 'on')))
|| !isset($attrSubSet[1]))
{
continue;
}
Expand All @@ -626,7 +626,6 @@ protected function _cleanAttributes($attrSet)
// Strip slashes
$attrSubSet[1] = stripslashes($attrSubSet[1]);


// Autostrip script tags
if (self::checkAttribute($attrSubSet))
{
Expand Down

0 comments on commit d5d54fe

Please sign in to comment.