At the same time, a background injection in huashun causes the universal password to enter the background and leak large user information and solutions.

Source: Internet
Author: User

At the same time, a background injection in huashun causes the universal password to enter the background and leak large user information and solutions.

Background address:

http://basic.10jqka.com.cn/admin/index.php?op=csiReport&act=view

If there is injection in the background, we will not demonstrate it here. Use the universal password to directly go in:

Admin 'or '1' = '100

 

In IE 11, sometimes the compatibility is not very good, and they all go below ..
 




 




 

 

Solution:

Use the parameterized query interface or escape or filter the external parameters in the SQL statement at the code level:

For integers, check whether the variable meets the value of [0-9]. For other values, check the validity of the variable.

For strings, escape special characters in SQL statements (single quotes are converted into two single quotes, and double quotes are converted into two double quotes ). For example, PHP has similar escape functions: mysql_escape_string and mysql_real_escape_string.

[PHP repair example]

$id=$_GET['id'];   $conn = mysql_connect("localhost","root","") or die ("wrong!");   $sel=mysql_select_db("mydb",$conn);   $sql="select * from user where id = :id";   $stmt = $conn->prepare($sql);     $stmt->execute(array(':id'=>$id));     ?>

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.