Quote:
|
Originally Posted by naissa
Can you help me protect my scripts from hacking?
What are the codes to protect it?
|
As Koncept said, there is no one single method. In short, however, the best thing you can do is to rigorously and consistently validate your incoming data to ensure it's "clean".
-If the incoming data is supposed to be a number, allow only numbers to pass through.
-Limit the length of incoming vars and validate them for 'legal' lengths.
-Turning on magic_quotes can help screen out a lot of the simpler attacks.
-add code to catch 'boundary' conditions .
-add code for 'sanity tests' in your app. Abort the current process if the sanity test fails.
These are just a few basic ideas. The overriding Rule Of Thumb is "Don't trust the network."