Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

checkIntegerRange seems bad #9

Open
reductor opened this issue Dec 23, 2015 · 0 comments
Open

checkIntegerRange seems bad #9

reductor opened this issue Dec 23, 2015 · 0 comments

Comments

@reductor
Copy link

Reading over:
http://phpsecurity.readthedocs.org/en/latest/Input-Validation.html

The example of checkIntegerRange seems bad, if you pass an array the is_string fails and is_int passes because of the explicit conversion.

While this is safe, as I believe (array() <= int) is always false, the fact that it can reach this point is not ideal, someone could modify this function to instead just have the min which will pass.

(Have not tested on newer versions of PHP)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant