[Train hacking] HTTP_GET_Validator
| From: | Sebastian Bergmann | Date: | Sat, 16 Mar 2002 16:11:14 +0000 |
| Subject: | [Train hacking] HTTP_GET_Validator | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-4993@lists.php.net to get a copy of this message | ||
'lo there,
I'm just sitting on a train from CeBIT back home and got bored. While
beeing bored, I remembered an idea of Thies's he explained to me in
Brussles. He actually started implementing it there, but never heard of
him about it since.
Well, I just hacked some lines of code and came up with a very basic
solution for the problem of validating HTTP GET parameters.
With this early version of the code it is possible to
* allow HTTP GET parameters by name, and just use these allowed
parameters
* validate HTTP GET parameters based on regular expressions
It should be fairly easy to add support for further validation
techniques, for instance callbacks to PHP functions that get called
with the parameter's name and value and return a boolean for whether
or not this parameter is valid.
Well, this helped me to pass at least 10 minutes of time of an
otherwise boring train ride, so it already was worth something ;-)
Greetings,
Sebastian
--
Sebastian Bergmann
http://sebastian-bergmann.de/ http://phpOpenTracker.de/
Did I help you? Consider a gift: http://wishlist.sebastian-bergmann.de/