Personal records
One, web security authentication
- Input validation
- Prevent cross-site scripting XSS attacks
- Prevent SQL injection
- Image Verification Code
Second, input verification
The classic security rule: Never trust user-submitted data
Verify content:
- User name, password and other formats
- Verifying the length prevents database overflow errors
- mail, cell phone, zip code and other formats
client: mainly through JavaScript to verify, filter user input
server-side: detects the legality of user input, casts user value input, and database constraint validation
Iii. Prevention of cross-site scripting XSS attacks
- Strict input validation is implemented
- Implement session markers, etc.
- To format HTML
IV. Preventing SQL injection
Client:
- Filter or escape dangerous characters
- restricting input using regular expressions
Server-side:
- Controlling access to a database
- Step through user name and password verification
- Encrypt the account.
Five, image verification code
Secure encoding in the Web