What types of protection is there for a site written in PHP to avoid further attacks from hackers? I am new to PHP programming, please share tips, write a site, I’ll immediately think about protection.
|
3 answers
The question is quite wide. What you need to pay attention.
- Always check parameters (especially
$_GET, $_POST, $_COOKIE
), for example, check that cities are cities, and numbers are numbers. - Use strong authentication (
PEAR::Auth
, etc.). - Ensure that server settings do not allow reading sensitive session data from outside.
- Always filter external data (
htmlspecialchars
, etc.) when displaying. - Take measures to protect against SQL injection (
mysql_real_escape_string
, etc.).
|
Another thing to prevent hacking, the signaling for the site: http://jkeks.ru/jAntivirus
|