4 ms·
Pro tip - first thing when you start a PHP project: - move all superglobals to your private vars - only allow access to these vars through your special functi
by Drdrdrq 10y ago
Pro tip - first thing when you start a PHP project:
- move all superglobals to your private vars
- only allow access to these vars through your special functions which REQUIRE from programmer to specify type and validation / sanitization (regex for strings, min/max for numbers,...)
Make it difficult for programmers to use unsanitized vars and you will have much more secure code.
Not sure why no frameworks (that I know of) do this, but fortunately it is easy to add this.