-
Notifications
You must be signed in to change notification settings - Fork 136
escaped "." in regex for ipv4 Validation #56
Conversation
…mework#56 - Each of which have been merged to this patch.
We need unit tests to validate the change; can you please provide some, @BlckStar ? |
I've written unit tests. Interestingly, while the regex is incorrect, that fact does not result in false positives. The reason is because we then call I'll still merge the change, as we should be escaping the |
escaped "." in regex for ipv4 Validation
Added tests to verify that malformed IP addresses are flagged as invalid. Interestingly, the "fix" presented in #56 doesn't change the operation of the validator; this is because the value is passed to `ip2long()`, which returns boolean false due to invalid input. That said, the changes make sense; the `.` character should be a literal match, and not a wildcard.
…mework#56 - Each of which have been merged to this patch.
Okay thanks, was stumbling over this. Sry i am kind of new at github and doing a pull request for the first time. But unit test sounds good. I will remember this. Von Outlook Mobile gesendet On Wed, Feb 17, 2016 at 9:08 AM -0800, "weierophinney" [email protected] wrote: Merged #56. — |
"." was not literal dot but any-char , IP "11111111111" was valid