From 0f060166e6c0334f670b971a99ce2a8e616e8d17 Mon Sep 17 00:00:00 2001 From: mdipierro Date: Sat, 2 May 2020 21:03:21 -0700 Subject: [PATCH] verson 20200502.2 --- pydal/__init__.py | 2 +- pydal/validators.py | 4 ++-- tests/validators.py | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pydal/__init__.py b/pydal/__init__.py index b7022fc90..7738f1115 100644 --- a/pydal/__init__.py +++ b/pydal/__init__.py @@ -1,4 +1,4 @@ -__version__ = "20200502.1" +__version__ = "20200502.2" from .base import DAL from .objects import Field diff --git a/pydal/validators.py b/pydal/validators.py index 8548b6968..81d16e8b1 100644 --- a/pydal/validators.py +++ b/pydal/validators.py @@ -4455,7 +4455,7 @@ def validate(self, value, record_id=None): numberset = frozenset(b"0123456789") sym1set = frozenset(b"!@#$%^&*() ") sym2set = frozenset(b"~`-_=+[]{}\\|;:'\",.<>?/") -otherset = frozenset(b"".join(chr(x) if PY2 else chr(r).encode() for x in range(256))) +otherset = frozenset(b"".join(chr(x) if PY2 else chr(x).encode() for x in range(256))) def calc_entropy(string): @@ -4515,7 +4515,7 @@ class IS_STRONG(Validator): >>> IS_STRONG(es=True, entropy=100)('a1d') ('a1d', 'Password too simple (15.97/100)') >>> IS_STRONG(es=True, entropy=100)('añd') - ('a\\xc3\\xb1d', 'Password too simple (18.13/100)') + ('a\\xc3\\xb1d', 'Password too simple (31.26/10)') """ diff --git a/tests/validators.py b/tests/validators.py index d2a410baa..c428258d3 100644 --- a/tests/validators.py +++ b/tests/validators.py @@ -1058,10 +1058,10 @@ def test_IS_STRONG(self): rtn = IS_STRONG(es=True, entropy=100)("añd") if PY2: self.assertEqual( - rtn, ("a\xc3\xb1d", "Password too simple (18.13/100)") + rtn, ("a\xc3\xb1d", "Password too simple (32.66/100)") ) else: - self.assertEqual(rtn, ("añd", "Password too simple (18.13/100)")) + self.assertEqual(rtn, ("añd", "Password too simple (31.26/10)")) rtn = IS_STRONG()("********") self.assertEqual(rtn, ("********", None)) rtn = IS_STRONG(es=True, max=4)("abcde")