Skip to content
Advertisement

Tag: methods

Validate class/method names with regex

I’m currently working on an MVC Style framework for a company and for security reasons I need to make sure that the controller / method that’s passed via the Query String is valid chars to the RFC (which I can’t find). I need to be able to validate / sanitize class names according to what’s allowed by the PHP interpreter

What’s wrong with using $_REQUEST[]?

I’ve seen a number of posts on here saying not to use the $_REQUEST variable. I usually don’t, but sometimes it’s convenient. What’s wrong with it? Answer There’s absolutely nothing wrong with taking input from both $_GET and $_POST in a combined way. In fact that’s what you almost always want to do: for a plain idempotent request usually submitted

Advertisement