来源:自学PHP网 时间:2015-04-15 15:00 作者: 阅读:次
[导读] 上Hdwiki官网 发现更新日期一直都没变。还以为一直都没更新了, 结果今天下载一个下来看看。发现之前发的洞竟然都补掉了。 非盲注 直接出数据。ps 更新程序了应该还是把日期更新了一...
|
上Hdwiki官网 发现更新日期一直都没变。 在user/pms.php中
function doblacklist(){
if(isset($this->post['blacklist'])){
$blacklist = htmlspecialchars(string::stripscript($this->post['blacklist']));
if(empty($blacklist)){
$result = $_ENV['pms']->remove_blacklist($this->user['uid']);
}else{
$result = $_ENV['pms']->add_blacklist($blacklist,$this->user['uid']);
}
function stripscript($string){
$pregfind=array("/<script.*>.*<\/script>/siU",'/on(error|mousewheel|mouseover|click|load|onload|submit|focus|blur|start)="[^"]*"/i');
$pregreplace=array('','',);
$string=preg_replace($pregfind,$pregreplace,$string);
return $string;
}
}
function add_blacklist($blacklist,$uid){
return($this->db->query("REPLACE INTO ".DB_TABLEPRE."blacklist (uid,blacklist) VALUES('$uid','$blacklist')"));
}
function dobox(){
$this->get[3] = empty($this->get[3]) ? NULL : $this->get[3];
$page = max(1,isset($this->get[4]) ? $this->get[4] : $this->get[3]);
$num = isset($this->setting['list_prepage'])?$this->setting['list_prepage']:20;
$start_limit = ($page - 1) * $num;
$count = $_ENV['pms']->get_totalpms($this->user['uid'], $this->get[2]);
function get_totalpms($uid, $type, $group=''){
$sqladd = '';
if($type == 'inbox'){
$blacklist = $this->get_blacklist($uid);
if($blacklist == '[ALL]'){
return '0';
}else{
$blackuser = str_replace(",","','",$blacklist);
if($group){
$sqladd = ($group == 'owner') ? 'AND og=0' : 'AND og=1';
}
$query = "SELECT COUNT(*) num FROM ".DB_TABLEPRE."pms WHERE toid='$uid' AND delstatus!=2 AND drafts!=1 $sqladd AND `from` NOT IN ('$blackuser')";
}
}else{
$sqladd = ($type == 'outbox') ? 'drafts!=1' : 'drafts=1';
$query = "SELECT COUNT(*) as num FROM ".DB_TABLEPRE."pms WHERE fromid='$uid' AND delstatus!=1 AND $sqladd";
}
$total = $this->db->fetch_first($query);
return $total['num'];
}
function get_blacklist($uid){
$user = $this->db->fetch_first("SELECT blacklist FROM ".DB_TABLEPRE."blacklist WHERE uid='".$uid."'");
return $user['blacklist'];
}
$blackuser = str_replace(",","','",$blacklist);
if($group){
$sqladd = ($group == 'owner') ? 'AND og=0' : 'AND og=1';
}
$query = "SELECT COUNT(*) num FROM ".DB_TABLEPRE."pms WHERE toid='$uid' AND delstatus!=2 AND drafts!=1 $sqladd AND `from` NOT IN ('$blackuser')";
修复方案:转义一下。 |
自学PHP网专注网站建设学习,PHP程序学习,平面设计学习,以及操作系统学习
京ICP备14009008号-1@版权所有www.zixuephp.com
网站声明:本站所有视频,教程都由网友上传,站长收集和分享给大家学习使用,如由牵扯版权问题请联系站长邮箱904561283@qq.com