Qibocms B2B Injection

Source: Internet
Author: User

B2B system. In news/js. php

f($type=='hot'||$type=='com'||$type=='new'||$type=='lastview'||$type=='like')  {   if($f_id)   {    if(is_numeric($f_id)){     $SQL=" fid=$f_id ";    }else{     $detail=explode(",",$f_id);     $SQL=" fid IN ( ".implode(",",$detail)." ) ";    }   }   else   {    $SQL=" 1 ";   }   if($type=='com')   {    $SQL.=" AND levels=1 ";    $ORDER=' list ';    $_INDEX=" USE INDEX ( list ) ";   }   elseif($type=='hot')   {    $ORDER=' hits ';    $_INDEX=" USE INDEX ( hits ) ";   }   elseif($type=='new')   {    $ORDER=' list ';    $_INDEX=" USE INDEX ( list ) ";   }   elseif($type=='lastview')   {    $ORDER=' lastview ';    $_INDEX=" USE INDEX ( lastview ) ";   }   elseif($type=='like')   {    $SQL.=" AND id!='$id' ";    if(!$keyword)    {     extract($db->get_one("SELECT keywords AS keyword FROM {$_pre}content WHERE id='$id'"));    }    if($keyword){     $SQL.=" AND ( ";     $keyword=urldecode($keyword);     $detail=explode(" ",$keyword);     unset($detail2);     foreach( $detail AS $key=>$value){      $detail2[]=" BINARY title LIKE '%$value%' ";     }     $str=implode(" OR ",$detail2);     $SQL.=" $str ) ";    }else{     $SQL.=" AND 0 ";

 

The keyword is decoded. Therefore, the global escape is ignored. Then use spaces to cut. No space is allowed. The test is successful on the official website.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.