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

Regex Accepts Invalid IP Address #5

Open
uVAdN2vUw2aMENSu19cY7ic24Gvp7Fd opened this issue Sep 17, 2013 · 1 comment
Open

Regex Accepts Invalid IP Address #5

uVAdN2vUw2aMENSu19cY7ic24Gvp7Fd opened this issue Sep 17, 2013 · 1 comment

Comments

@uVAdN2vUw2aMENSu19cY7ic24Gvp7Fd

Inside name.class.php the regex:

    $mask['ip'] = '@^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?).(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?).(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?).(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$@';

accepts ip addresses such as: 10.00.10.110 which causes bind to give an error.

This should be updated to a regex such as this:

^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]).){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$

@puggan
Copy link

puggan commented Apr 18, 2015

solved in:
puggan@65bf5f9

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

2 participants