What do you need to pay attention to when registering for a website? Solutions

Source: Internet
Author: User
What do you need to pay attention to when registering for a website?
Especially in terms of security, what do we need to pay attention to?

------Solution--------------------
1. Encrypt password
2. Prevent injection
3. Verification code.
------Solution--------------------
Explore

1. Encrypt password
2. Prevent injection
3. Verification code.

------Solution--------------------
There's nothing to pay attention to. To prevent someone from registering with the registration machine. The characters that can be entered by the account password are verified
It is best to send an email to activate your account after registering

Don't trust user input but don't treat every user as an enemy.
I'm going to register an account with your website. You've got a lot of trouble, and I'm definitely not coming.
------Solution--------------------
1, verify that the fields meet the design requirements, such as:
Email must contain @ and.; User names cannot contain special characters, etc.
2. When querying data directly using SQL statements, all variables added to the statement are filtered;
3, the registration page and the character set of the database should be unified, or UTF8 escape vulnerability what is enough to drink a pot;
4, the password is best to use Md5+salt method encryption, that is, the database holds two fields, password and Salt,password = MD5 (MD5 (password) + salt). Salt Each change password is randomly generated;
5, through the verification code to limit machine registration, verification code should not be stored in the form of cookies in the client, otherwise reusable, try to use the session or database, just like the client to provide an index or ID.
------Solution--------------------
About salt You can look at someone else's
http://pbeblog.wordpress.com/2008/02/12/secure-hashes-in-php-using-salt/
  • 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.