666666, http://www.anonymou5.com
2018年10月12日,某CMS官方修复了一处XSS漏洞:
简要分析
source/module/misc/misc_ranklist.php:166
<?php
function getranklist_members($offset = 0, $limit = 20) {
require_once libfile('function/forum');
$members = array();
$topusers = C::t('home_show')->fetch_all_by_unitprice($offset, $limit, true);
foreach($topusers as $member) {
$member['avatar'] = avatar($member['uid'], 'small');
$member['note'] = dhtmlspecialchars($member['note']);
$members[] = $member;
}
return $members;
}
Dz在此处获取到$member['note']
后调用了dhtmlspecialchars
进行过滤,在source/function/function_core.php:203 会对'&', '"', '<', '>'进行实体编码。
<?php
function dhtmlspecialchars($string, $flags = null) {
if(is_array($string)) {
。。。
} else {
if($flags === null) {
点击收藏 | 1
关注 | 1