Replies: 1 comment 1 reply
-
Hello, please show how you declared filter service? If you don't, declare service
And call, for example, in request data:
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I noticed that using sanitizer with http/request doesn't work at all!
Example:
var_dump($this->request->getPost('p','string',null,true)); var_dump($this->request->getQuery('p','int!',null,true));
Neither does anything.
Do others experience the same?
I noticed people trying to attack my site. From the logs, I saw errors that should have been filtered. Turns out, none of these filters worked.
Using
filter_var($this->request->getQuery('p'),FILTER_VALIDATE_INT,FILTER_NULL_ON_FAILURE);
works
Or better
filter_var($_GET['p'],FILTER_VALIDATE_INT,FILTER_NULL_ON_FAILURE);
Which is what Http/Request/getHelper tries to do.
Beta Was this translation helpful? Give feedback.
All reactions