Jump to content

Possible hacks?


vic vance

Recommended Posts

1. escape all user data before using in an SQL statement using mysql_real_escape_string (assuming your db server is MySQL). This will prevent SQL injection and XSS. however it is preferred to use PDO with prepared statements.

 

2. Do not use $_SERVER['PHP_SELF'] as a forms action, this will leave your forms open to XSS.

 

3. Make sure files and directories have the proper permissions so user cannot view and/or tamper with them.

 

There is a list of things that you can do for added security, I'm sure other users will list more. I will leave you with some reading from php.net on the security subject: http://php.net/manual/en/security.php

Link to comment
https://forums.phpfreaks.com/topic/257764-possible-hacks/#findComment-1321136
Share on other sites

Off the top of my sleep deprived head (I'm at 21 hours I think):

SQL injection, XSS injection, cross-site request forgery, SSL, and encryption practices to start. There are also a few nuances with PHP like the downsides of loose typing, how form variables are strings, scalars versus arrays from forms and how PHP can barf on them.

Link to comment
https://forums.phpfreaks.com/topic/257764-possible-hacks/#findComment-1321139
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.