Richard Heyes has a new post on his weblog today with three good functions to help you clean up input data.
The [following] code can be dropped into your app, into a common include for example, to fix this. Simply call dispelGlobals() and dispelMagicQuotes() and stop worrying.
When you code with register_globals and magic_quotes_gpc off, it's easy to forget that some people do actually use them. Subsequently it's quite easy to inadvertently introduce vulnerabilities into your code when it's used on such a platform.
The three quick little functions can help make your scripts a bit more secure with every page load. The register_globals and magic_quotes_gpc settings, while useful in their own right, seem to cause more harm than good when it comes to web applications. Hopefully, these functions can help take some of the egde off...




