How can we improve the security of Web code? -Php Tutorial

Source: Internet
Author: User
I just graduated from an Internet company and saw that the previous code has many security risks. for example, I can use ajax to send some requests to complete some operations. Is there any way to improve the security of my code? are there any books or tools that can be recommended? Thank you! I just graduated from an Internet company and saw that the previous code has many security risks. for example, I can use ajax to send some requests to complete some operations. Is there any way to improve the security of my code? are there any books or tools that can be recommended? Thank you! Reply content: recommended:
Advanced PHP application vulnerability review technology [https://code.google.com/p/pasc2at/wiki/SimplifiedChinese ]
Php Codz Hacking [http://www.80vul.com/pch/ ]
Some Of Discuz! Bugs [http://www.80vul.com/dzvul/ ]
80Vul [http://www.80vul.com/ ]
Wst bbs [http://www.phpsec.net/ ]
WooYun Zone [http://zone.wooyun.org/zone/php ] The existing answers are biased towards system backend security. I will provide a front-end development idea:

1. all operations involving data changes (add, delete, and modify) should use the POST method.
2. all user-input content should be escaped (esacpe)
3. in the head section of the HTML document, specify charset first (see http://code.google.com/p/doctype/wiki/ArticleUtf7 )
4. set the correct document. domain
5. if you rely on cookies to verify the logon status, make sure that cookies in the current domain are not contaminated (see Yummy cookies website SS domains website GitHub )
6. try not to use JavaScript to dynamically insert text controls (especially when binding events with onxxx, you can refer to the idea of AngularJS)

Supplement the WooYun knowledge base The more you know about web security, the more secure your code is. if you think of that knowledge when writing code... Every variable is confidential. Every input is harmful. XSS, SQL injection check, CSRF. For more information, see White hat Web security (Douban)

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.