Re: [Django] #25452: Email validation for domain `gmail.-com` is considered valid

2016-03-30 Thread Django
#25452: Email validation for domain `gmail.-com` is considered valid
+
 Reporter:  phalt   |Owner:  bak1an
 Type:  Bug |   Status:  closed
Component:  Forms   |  Version:  1.8
 Severity:  Normal  |   Resolution:  wontfix
 Keywords:  | Triage Stage:  Accepted
Has patch:  1   |  Needs documentation:  0
  Needs tests:  0   |  Patch needs improvement:  1
Easy pickings:  0   |UI/UX:  0
+

Comment (by timgraham):

 Ticket for simplifying the validation is #26423.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.8b9ffc3ce915e56dad6a78b6ffd5527e%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #25452: Email validation for domain `gmail.-com` is considered valid

2016-03-19 Thread Django
#25452: Email validation for domain `gmail.-com` is considered valid
+
 Reporter:  phalt   |Owner:  bak1an
 Type:  Bug |   Status:  closed
Component:  Forms   |  Version:  1.8
 Severity:  Normal  |   Resolution:  wontfix
 Keywords:  | Triage Stage:  Accepted
Has patch:  1   |  Needs documentation:  0
  Needs tests:  0   |  Patch needs improvement:  1
Easy pickings:  0   |UI/UX:  0
+

Comment (by claudep):

 Tim, is there a ticket about the simplification, or should we create one?

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.34e96df03a316d9f883e0156ccc71e1b%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #25452: Email validation for domain `gmail.-com` is considered valid

2016-03-19 Thread Django
#25452: Email validation for domain `gmail.-com` is considered valid
+
 Reporter:  phalt   |Owner:  bak1an
 Type:  Bug |   Status:  closed
Component:  Forms   |  Version:  1.8
 Severity:  Normal  |   Resolution:  wontfix
 Keywords:  | Triage Stage:  Accepted
Has patch:  1   |  Needs documentation:  0
  Needs tests:  0   |  Patch needs improvement:  1
Easy pickings:  0   |UI/UX:  0
+
Changes (by timgraham):

 * status:  assigned => closed
 * resolution:   => wontfix


Comment:

 The consensus on the mailing list seems to be to simplify the validation,
 not make it more comprehensive.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.2da738e19e3d93ee1136f5c704b535af%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #25452: Email validation for domain `gmail.-com` is considered valid

2016-03-14 Thread Django
#25452: Email validation for domain `gmail.-com` is considered valid
+
 Reporter:  phalt   |Owner:  bak1an
 Type:  Bug |   Status:  assigned
Component:  Forms   |  Version:  1.8
 Severity:  Normal  |   Resolution:
 Keywords:  | Triage Stage:  Accepted
Has patch:  1   |  Needs documentation:  0
  Needs tests:  0   |  Patch needs improvement:  1
Easy pickings:  0   |UI/UX:  0
+
Changes (by timgraham):

 * needs_better_patch:  0 => 1


Comment:

 I started a [https://groups.google.com/d/topic/django-
 developers/ASBJ0ge2KYo/discussion thread on django-developers] to find a
 way forward.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.ffc086668e6d42702fdabc2df77588d3%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #25452: Email validation for domain `gmail.-com` is considered valid

2016-03-13 Thread Django
#25452: Email validation for domain `gmail.-com` is considered valid
+
 Reporter:  phalt   |Owner:  bak1an
 Type:  Bug |   Status:  assigned
Component:  Forms   |  Version:  1.8
 Severity:  Normal  |   Resolution:
 Keywords:  | Triage Stage:  Accepted
Has patch:  1   |  Needs documentation:  0
  Needs tests:  0   |  Patch needs improvement:  0
Easy pickings:  0   |UI/UX:  0
+

Comment (by nedbatchelder):

 @bak1an: Can you explain why it's important to reject "gmail.-com"?  Why
 add *any* more complexity just to reject more bogus email addresses?

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.79211745542ff1d4654c9cba4f8d5169%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #25452: Email validation for domain `gmail.-com` is considered valid

2016-03-13 Thread Django
#25452: Email validation for domain `gmail.-com` is considered valid
+
 Reporter:  phalt   |Owner:  bak1an
 Type:  Bug |   Status:  assigned
Component:  Forms   |  Version:  1.8
 Severity:  Normal  |   Resolution:
 Keywords:  | Triage Stage:  Accepted
Has patch:  1   |  Needs documentation:  0
  Needs tests:  0   |  Patch needs improvement:  0
Easy pickings:  0   |UI/UX:  0
+

Comment (by bak1an):

 How about resolving this issue with the
 [https://github.com/django/django/compare/master...bak1an:ticket_25452_minimal
 smallest possible change ] and moving future validation regex improvement
 discussion into separate ticket? Would this be legit?

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.83060044f3a78228d503bd26015a3aee%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #25452: Email validation for domain `gmail.-com` is considered valid

2016-03-11 Thread Django
#25452: Email validation for domain `gmail.-com` is considered valid
+
 Reporter:  phalt   |Owner:  bak1an
 Type:  Bug |   Status:  assigned
Component:  Forms   |  Version:  1.8
 Severity:  Normal  |   Resolution:
 Keywords:  | Triage Stage:  Accepted
Has patch:  1   |  Needs documentation:  0
  Needs tests:  0   |  Patch needs improvement:  0
Easy pickings:  0   |UI/UX:  0
+

Comment (by collinanderson):

 Though it gets more complicated when considering Unicode. Unicode needs to
 get normalized to ascii before running through the official regex.

 Here's how chrome does it:
 
https://code.google.com/p/chromium/codesearch#chromium/src/third_party/WebKit/Source/core/html/forms/EmailInputType.cpp

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.e160506e737b7454f62e9031e1982fe7%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #25452: Email validation for domain `gmail.-com` is considered valid

2016-03-11 Thread Django
#25452: Email validation for domain `gmail.-com` is considered valid
+
 Reporter:  phalt   |Owner:  bak1an
 Type:  Bug |   Status:  assigned
Component:  Forms   |  Version:  1.8
 Severity:  Normal  |   Resolution:
 Keywords:  | Triage Stage:  Accepted
Has patch:  1   |  Needs documentation:  0
  Needs tests:  0   |  Patch needs improvement:  0
Easy pickings:  0   |UI/UX:  0
+

Comment (by collinanderson):

 I think we should try to match the standard html 
 validation. I'd imagine that most uses cases would want to match that. We
 use the regex verbatim from the standard itself:

 https://html.spec.whatwg.org/multipage/forms.html#e-mail-
 state-(type=email)

 If people want to allow things outside of that they could use a custom
 regex.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.95b62efb027022ca609a68d36d7e085d%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #25452: Email validation for domain `gmail.-com` is considered valid

2016-03-11 Thread Django
#25452: Email validation for domain `gmail.-com` is considered valid
+
 Reporter:  phalt   |Owner:  bak1an
 Type:  Bug |   Status:  assigned
Component:  Forms   |  Version:  1.8
 Severity:  Normal  |   Resolution:
 Keywords:  | Triage Stage:  Accepted
Has patch:  1   |  Needs documentation:  0
  Needs tests:  0   |  Patch needs improvement:  0
Easy pickings:  0   |UI/UX:  0
+

Comment (by timgraham):

 I am open to that if you can get consensus on the DevelopersMailingList on
 a set of limitations that we can document so that we have something to
 point to when we get requests for enhancements. I imagine this policy
 would also include `URLValidator`.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.6fd64365fd57fdb1723bcfa682a727ee%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #25452: Email validation for domain `gmail.-com` is considered valid

2016-03-11 Thread Django
#25452: Email validation for domain `gmail.-com` is considered valid
+
 Reporter:  phalt   |Owner:  bak1an
 Type:  Bug |   Status:  assigned
Component:  Forms   |  Version:  1.8
 Severity:  Normal  |   Resolution:
 Keywords:  | Triage Stage:  Accepted
Has patch:  1   |  Needs documentation:  0
  Needs tests:  0   |  Patch needs improvement:  0
Easy pickings:  0   |UI/UX:  0
+

Comment (by nedbatchelder):

 Can I respectfully suggest that continuing to tweak this complex regex to
 get asymptotically closer to perfection is not worth it?  Especially to
 fix false positives.  What real-world problem is happening because
 "gmail.-com" is accepted?  "gmail.ccomm" is also accepted, but is just as
 useless as an email address.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.2595b5d0c00e5427f09d19c0a4f9f4ba%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #25452: Email validation for domain `gmail.-com` is considered valid

2015-11-08 Thread Django
#25452: Email validation for domain `gmail.-com` is considered valid
+
 Reporter:  phalt   |Owner:  bak1an
 Type:  Bug |   Status:  assigned
Component:  Forms   |  Version:  1.8
 Severity:  Normal  |   Resolution:
 Keywords:  | Triage Stage:  Accepted
Has patch:  1   |  Needs documentation:  0
  Needs tests:  0   |  Patch needs improvement:  0
Easy pickings:  0   |UI/UX:  0
+
Changes (by bak1an):

 * has_patch:  0 => 1


Comment:

 [https://github.com/django/django/pull/5612 The pull request]

 Unfortunately I have not found a good way to merge URLValidator and
 EmailValidator since there are tons of small differences.

 So I decided to fix EmailValidator instead. I tried to be as accurate as
 possible (actual regex changes are just few characters long).

 During reading various RFCs and articles I've found some other easy-
 fixable issues (like allowing quoted '@', space or backslash for dot atom
 local part, allowing spaces inside quoted local part, etc) those are
 included in above PR as well.


 Proper RFC-based email validation is a
 [http://haacked.com/archive/2007/08/21/i-knew-how-to-validate-an-email-
 address-until-i.aspx/ surprisingly hard task] and definitely no one wants
 to have [http://www.ex-parrot.com/~pdw/Mail-RFC822-Address.html few pages
 long regex] in Django.

 So updated validator is still not fully RFC compliant but few issues are
 fixed now (or covered with test cases).

 Commit messages includes detailed description of all changes that were
 made.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.08e0ee755034e7e62190867a8b4922df%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #25452: Email validation for domain `gmail.-com` is considered valid

2015-10-29 Thread Django
#25452: Email validation for domain `gmail.-com` is considered valid
+
 Reporter:  phalt   |Owner:  bak1an
 Type:  Bug |   Status:  assigned
Component:  Forms   |  Version:  1.8
 Severity:  Normal  |   Resolution:
 Keywords:  | Triage Stage:  Accepted
Has patch:  0   |  Needs documentation:  0
  Needs tests:  0   |  Patch needs improvement:  0
Easy pickings:  0   |UI/UX:  0
+
Changes (by DheerendraRathor):

 * cc: dheeru.rathor14@… (added)


--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.aa70d81994352c41ff870b81c7c38fa2%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #25452: Email validation for domain `gmail.-com` is considered valid

2015-09-23 Thread Django
#25452: Email validation for domain `gmail.-com` is considered valid
+
 Reporter:  phalt   |Owner:  bak1an
 Type:  Bug |   Status:  assigned
Component:  Forms   |  Version:  1.8
 Severity:  Normal  |   Resolution:
 Keywords:  | Triage Stage:  Accepted
Has patch:  0   |  Needs documentation:  0
  Needs tests:  0   |  Patch needs improvement:  0
Easy pickings:  0   |UI/UX:  0
+
Changes (by bak1an):

 * status:  new => assigned
 * owner:  nobody => bak1an


Comment:

 According to the https://tools.ietf.org/html/rfc1035 domain labels can
 contain hyphens but not as their first character.

 
[https://github.com/django/django/blob/71ebcb85b931f43865df5b322b2cf06d3da23f69/django/core/validators.py#L160
 EmailValidator.domain_regex] checks this for all labels but the last one
 (the TLD) and it looks like a bug to me (not something that was done on
 intention).

 
[https://github.com/django/django/blob/71ebcb85b931f43865df5b322b2cf06d3da23f69/django/core/validators.py#L89
 URLValidator] uses more complex domain validation regex set (including
 unicode, etc).

 I will double check if borrowing those checks into {{{EmailValidator}}}
 won't violate any standards and  come back with a patch in case it's ok.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.1f8eedd1bc195fd95189bdb5f02dd7a6%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #25452: Email validation for domain `gmail.-com` is considered valid

2015-09-23 Thread Django
#25452: Email validation for domain `gmail.-com` is considered valid
+
 Reporter:  phalt   |Owner:  nobody
 Type:  Bug |   Status:  new
Component:  Forms   |  Version:  1.8
 Severity:  Normal  |   Resolution:
 Keywords:  | Triage Stage:  Accepted
Has patch:  0   |  Needs documentation:  0
  Needs tests:  0   |  Patch needs improvement:  0
Easy pickings:  0   |UI/UX:  0
+

Comment (by timgraham):

 Please check `URLValidator` to see if it handles this (if so, maybe you
 could borrow from it) or if it requires a similar fix.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.fe031e9fafb82c2e3f7092db7922ef66%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #25452: Email validation for domain `gmail.-com` is considered valid

2015-09-23 Thread Django
#25452: Email validation for domain `gmail.-com` is considered valid
+
 Reporter:  phalt   |Owner:  nobody
 Type:  Bug |   Status:  new
Component:  Forms   |  Version:  1.8
 Severity:  Normal  |   Resolution:
 Keywords:  | Triage Stage:  Accepted
Has patch:  0   |  Needs documentation:  0
  Needs tests:  0   |  Patch needs improvement:  0
Easy pickings:  0   |UI/UX:  0
+

Comment (by phalt):

 We've been investigating this more and it appears that hyphens can be in
 TLDs, just not at the start of the beginning:

 > Domain names may be formed from the set of alphanumeric ASCII characters
 (a-z, A-Z, 0-9), but characters are case-insensitive. In addition the
 hyphen is permitted if it is surrounded by characters, digits or hyphens,
 although it is not to start or end a label.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.0e0cf9f69f9ff94f662184e257864dd9%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #25452: Email validation for domain `gmail.-com` is considered valid

2015-09-23 Thread Django
#25452: Email validation for domain `gmail.-com` is considered valid
+
 Reporter:  phalt   |Owner:  nobody
 Type:  Bug |   Status:  new
Component:  Forms   |  Version:  1.8
 Severity:  Normal  |   Resolution:
 Keywords:  | Triage Stage:  Accepted
Has patch:  0   |  Needs documentation:  0
  Needs tests:  0   |  Patch needs improvement:  0
Easy pickings:  0   |UI/UX:  0
+
Changes (by collinanderson):

 * cc: cmawebsite@… (added)
 * needs_better_patch:   => 0
 * needs_tests:   => 0
 * easy:  1 => 0
 * needs_docs:   => 0
 * stage:  Unreviewed => Accepted


Comment:

 Confirmed on 1.8 and 1.9. Chrome's email validation rejects this, so I
 assume this is unintentional.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.d754930c14cf85841afebd705115b1d1%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


[Django] #25452: Email validation for domain `gmail.-com` is considered valid

2015-09-23 Thread Django
#25452: Email validation for domain `gmail.-com` is considered valid
+
 Reporter:  phalt   |  Owner:  nobody
 Type:  Bug | Status:  new
Component:  Forms   |Version:  1.8
 Severity:  Normal  |   Keywords:
 Triage Stage:  Unreviewed  |  Has patch:  0
Easy pickings:  1   |  UI/UX:  0
+
 When entering an email like "test@gmail.-com" the email validator returns
 True.

 Particularly, the `validate_domain_part` allows domains with a hyphen
 character in the TLD:

 {{{
 from django.core.validators import validate_email
 validate_email.validate_domain_part('gmail.-com')
 True
 }}}

 Nearly all other special characters return correctly:

 {{{
 from django.core.validators import validate_email
 validate_email.validate_domain_part('gmail._com')
 False
 }}}

 Unless my knowledge of valid TLDs is wrong, I don't think this is correct
 :(

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/048.7bc108a07e6c5045f94c9a71b64ab7ae%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.