Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed test failure after IDN domain validation fix

Refs #17867.
The address in test_email_regexp_for_performance used to take forever
(security issue), then was supposed to fail after the fix (commit 9f8287a).
Now we are less strict with domain validation, due to new IDN domains,
hence the validation of this address pass now.
  • Loading branch information...
commit 252cd271e88e1c60fc49c06fac9d45e4c7f8750e 1 parent 0a0fe8f
Claude Paroz claudep authored
Showing with 2 additions and 6 deletions.
  1. +2 −6 tests/regressiontests/forms/tests/fields.py
8 tests/regressiontests/forms/tests/fields.py
View
@@ -516,12 +516,8 @@ def test_email_regexp_for_performance(self):
f = EmailField()
# Check for runaway regex security problem. This will take for-freeking-ever
# if the security fix isn't in place.
- self.assertRaisesMessage(
- ValidationError,
- "'Enter a valid email address.'",
- f.clean,
- 'viewx3dtextx26qx3d@yahoo.comx26latlngx3d15854521645943074058'
- )
+ addr = 'viewx3dtextx26qx3d@yahoo.comx26latlngx3d15854521645943074058'
+ self.assertEqual(addr, f.clean(addr))
def test_emailfield_not_required(self):
f = EmailField(required=False)
Please sign in to comment.
Something went wrong with that request. Please try again.