You cannot post messages because only members can post, and you are not currently a member.
Description:
Discussion group for Inspekt, a filtering and validation library for PHP
|
|
|
Inspekt and isset
|
| |
Hello, I'm starting to use the Inspekt validation library. Having trouble when combining with !isset. if (!isset($input->get->program)) (btw, $input is a SuperCage) Seems the IF statement is not evaluating. I see I have to use "getRaw" to retrieve the variable. When I use that I get a "Fatal error: Can't use method return value in write context"... more »
|
|
Problem with HTML list box with multiple selections
|
| |
Using some HTML like this:
<select name='test' multiple='yes'>
<option value='1'>one</option>
<option value='2'>two</option>
</select>
and selecting them both, I'm only able to retrieve the last item.
if ($this->cage->post->keyExists( 'test')) {
print_r($this->cage->post->get Raw('test'));... more »
|
|
testUri underscore fix
|
| |
There needs to be an underscore in the isUri regex in Inspekt.php,
otherwise urls with underscores don't parse. Here's the fixed path
line:
regex .= '(/((%[0-9a-f]{2}|[-_a-z0-9/~; :@=+$,.!*()\'\&]*)
*)/?)?'; // path
Most BBC urls have an underscore, so they're good for testing. Here's... more »
|
|
Float numbers
|
| |
Is it correct that to get a float variable, you should check to make sure it is a float and then do a getRaw? Other methods seem to strip the decimal point.
|
|
regex testing
|
| |
I was testing some regex patterns with isRegex and wasn't quite sure about the results that were returned. My thought going into it was that isRegex would return true if the *whole* $value matched the $pattern, but that doesn't seem to be the case. Here's my quick test [link] You can see where I added a check to capture the matches in preg_match... more »
|
|
iterating though a cages variables
|
| |
I've run into a case where my app is getting a bunch of GET params and
I need to be able to iterate through all the caged GET params, but
that doesn't seem possible. I see that I could get crazy and access
Inspekt_Cage::_source, but that obviously isn't intended. Is their a
recommend way to accomplish this without having to specify the name of... more »
|
|
How raw is getRaw?
|
| |
Hi all, a newbie question for you:
Does getRaw provide basic sanitation, or does it really return the
rawest of raw input?
Thank you!
|
|
Inspekt and PHP-IDS
|
| |
Not sure if anyone else will find this helpful. But I used a function
similar to the one below to integrate a PHP-IDS check into my Inspekt
Cage.
/**
* Will run the array or value against the PHP-IDS system.
* You can add logging to the to the isEmpty check by using the
code below.... more »
|
|
Kills all arrays?
|
| |
I must have done something wrong - now when I require the Inspekt
library, my regular arrays are no longer 'arrays' according to PHP..
Is this accurate? Does Inspekt somehow kill those arrays as well?
|
|
|