Is your program prone to SQL injection?

Source: Internet
Author: User
Tags sql injection

A person to a unit to develop a platform, after the development, according to the regular release to the external network server operation, the customer to the Administrator account, password told someone, this is to give someone convenient pre-test data.

Someone logged in often to see if the platform was all right, and never found any problems. But after a few months, someone thought of the platform to look up some data, but forget the password, how can not think of, and not good at asking customers to, so think of SQL injection, open their own write the source code login statement, as follows:

SELECT * from S_user where username= ' {0} ' and userpwd= ' {1} '

Someone look, if you want to log in illegally, it is not difficult!!!

In the User Name text box, type: admin '--

The last sign-in statement is as follows:

SELECT * from S_user where username= ' admin '--' and userpwd= ' {1} '

This is equivalent to querying only the user name, and password verification is commented!!!

Click Login, and indeed login success! Oh, my God!!!! How can this be???

At this point, I think there should be a lot of people besides someone else's program exists this problem! Does your program have this kind of problem?

Is your program prone to SQL injection?

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.