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

IPv4 regular expression fix #35

Closed
ghost opened this issue Feb 15, 2011 · 4 comments
Closed

IPv4 regular expression fix #35

ghost opened this issue Feb 15, 2011 · 4 comments

Comments

@ghost
Copy link

ghost commented Feb 15, 2011

Hi, I'm looking into your source and see that your regular expression for IPv4 recognition can be improved. As it looks today, an IP like 999.999.999.999 is allowed -- which it shouldn't. A better pattern for IP matching is;

^\b(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]?)\b$

@orefalo
Copy link
Collaborator

orefalo commented Feb 15, 2011

You are completely right, plz fork the repo and submit a pull request. don't forget the translations.

Thank you

@ghost
Copy link
Author

ghost commented Feb 15, 2011

Sorry, don't have Git installed! Otherwise I would've done it already ;-)

@DelphicOkami
Copy link
Contributor

I've issued a pull request with a fix for this in it

@orefalo
Copy link
Collaborator

orefalo commented Feb 19, 2011

done thank u

This issue was closed.
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