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

IPV6BADCHAR: Split up? #8

Closed
GoogleCodeExporter opened this issue Jan 22, 2016 · 1 comment
Closed

IPV6BADCHAR: Split up? #8

GoogleCodeExporter opened this issue Jan 22, 2016 · 1 comment

Comments

@GoogleCodeExporter
Copy link

After explode() we are checking each single "group" against the pattern 
[0-9A-Fa-f]{0,4}. If it does not match, we are sending IPV6BADCHAR.

This diagnosis could be confusing if we check

:ffdee:

Here we do NOT have bad characters inside, instead we have just a too long 
"group". Maybe we should define and alternative error-code for it.

(PS: Why did you match with preg_grep() and not with preg_match() as my initial 
version draft was?)

Original issue reported on code.google.com by danielma...@googlemail.com on 1 Oct 2010 at 1:45

@GoogleCodeExporter
Copy link
Author

I've changed the description of ISEMAIL_IPV6BADCHAR to "The IPv6 address 
contains an illegal group of characters" in is_email_statustext.php

I used preg_grep to avoid writing a loop in PHP code when it could be done by 
the underlying engine. I didn't benchmark it because it's difficult to know how 
real-world data would impact this choice. I did it mainly because there is less 
code this way.

Original comment by dominic....@gmail.com on 4 Oct 2010 at 3:34

  • Changed state: Fixed

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

No branches or pull requests

1 participant