From: <be...@us...> - 2015-09-21 19:59:59
|
Revision: 13149 http://sourceforge.net/p/xoops/svn/13149 Author: beckmi Date: 2015-09-21 19:59:57 +0000 (Mon, 21 Sep 2015) Log Message: ----------- moved "count($tagsArray)" and "count($attrArray)" outside of FOR loop Modified Paths: -------------- XoopsCore/branches/2.5.x/2.5.8/docs/changelog.250.txt XoopsCore/branches/2.5.x/2.5.8/htdocs/class/xoopsfilterinput.php Modified: XoopsCore/branches/2.5.x/2.5.8/docs/changelog.250.txt =================================================================== --- XoopsCore/branches/2.5.x/2.5.8/docs/changelog.250.txt 2015-09-21 19:55:41 UTC (rev 13148) +++ XoopsCore/branches/2.5.x/2.5.8/docs/changelog.250.txt 2015-09-21 19:59:57 UTC (rev 13149) @@ -23,6 +23,7 @@ - added possibility to include full icon URL in module's menu.php (mamba) - added strong { font-weight: bold; } to reset.css (mamba) - added .tpl option for module Help files (mamba) +- fix moved "count($tagsArray)" and "count($attrArray)" outside of FOR loop in xoopsfilterinput.php (mamba) Security fixes Modified: XoopsCore/branches/2.5.x/2.5.8/htdocs/class/xoopsfilterinput.php =================================================================== --- XoopsCore/branches/2.5.x/2.5.8/htdocs/class/xoopsfilterinput.php 2015-09-21 19:55:41 UTC (rev 13148) +++ XoopsCore/branches/2.5.x/2.5.8/htdocs/class/xoopsfilterinput.php 2015-09-21 19:59:57 UTC (rev 13149) @@ -66,10 +66,12 @@ $xssAuto = 1 ) { // make sure user defined arrays are in lowercase - for ($i = 0; $i < count($tagsArray); ++$i) { + $tagsArrayCount = count($tagsArray); + for ($i = 0; $i < $tagsArrayCount; ++$i) { $tagsArray[$i] = strtolower($tagsArray[$i]); } - for ($i = 0; $i < count($attrArray); ++$i) { + $attrArrayCount = count($attrArray); + for ($i = 0; $i < $attrArrayCount; ++$i) { $attrArray[$i] = strtolower($attrArray[$i]); } // assign to member vars @@ -378,7 +380,8 @@ if (!$isCloseTag) { $attrSet = $this->filterAttr($attrSet); $preTag .= '<' . $tagName; - for ($i = 0; $i < count($attrSet); ++$i) { + $attrSetCount = count($attrSet); + for ($i = 0; $i < $attrSetCount; ++$i) { $preTag .= ' ' . $attrSet[$i]; } // reformat single tags to XHTML @@ -413,7 +416,8 @@ { $newSet = array(); // process attributes - for ($i = 0; $i <count($attrSet); ++$i) { + $attrSetCount = count($attrSet); + for ($i = 0; $i < $attrSetCount; ++$i) { // skip blank spaces in tag if (!$attrSet[$i]) { continue; |