+ 5
A checklist for security in programs
What are the best practices about securing our code? I'm pretty sure some of us have found a few of these little tips or big guidelines to make applications more secure. What are the most immediate measures and countermeasures one has to put in its code? Please, answer with a clear differentiation of the language/s you are referring to, try to explain from different points of view or levels of difficulty,and provide an example whenever it is possible.
1 Answer
+ 3
PHP: this language is weakly typed, which makes it transform data from one type to another needed or required automatically, which can throw errors and open opportunities for code injection. Not only that: some operators are not strict enough and some built-in functions won't work properly for the security of the code. A solution for this is to not make implicit type conversions without error handling.
source: https://www.owasp.org/index.php/PHP_Security_Cheat_Sheet