Skip to content

checkIntegerRange seems bad #9

Description

@reductor

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)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions