Skip to content

Commit

Permalink
Fixed password_check in sonicprobe.helpers.
Browse files Browse the repository at this point in the history
  • Loading branch information
Adrien Delle Cave committed Sep 24, 2022
1 parent 0c815e5 commit ff5edfc
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 7 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG
@@ -1,3 +1,15 @@
python-sonicprobe (0.3.48) unstable; urgency=medium

* Fixed password_check in sonicprobe.helpers.

-- Adrien DELLE CAVE (Decryptus) <adc@doowan.net> Sat, 24 Sep 2022 17:44:20 +0200

python-sonicprobe (0.3.47) unstable; urgency=medium

* Reviewed requirements.

-- Adrien DELLE CAVE (Decryptus) <adc@doowan.net> Tue, 09 Aug 2022 01:32:00 +0200

python-sonicprobe (0.3.46) unstable; urgency=medium

* Added function password_check in sonicprobe.helpers.
Expand Down
2 changes: 1 addition & 1 deletion RELEASE
@@ -1 +1 @@
0.3.46
0.3.48
2 changes: 1 addition & 1 deletion VERSION
@@ -1 +1 @@
0.3.46
0.3.48
2 changes: 1 addition & 1 deletion requirements.txt
@@ -1,4 +1,4 @@
httpdis>=0.6.23
httpdis>=0.6.25
pyOpenSSL
python-magic
psutil>=2.1
Expand Down
4 changes: 2 additions & 2 deletions setup.yml
Expand Up @@ -4,8 +4,8 @@ description: sonicprobe
author: Adrien Delle Cave
author_email: pypi@doowan.net
copyright: '2022 Adrien Delle Cave'
release: '0.3.46'
version: '0.3.46'
release: '0.3.48'
version: '0.3.48'
license: License GPL-3
url: https://github.com/decryptus/sonicprobe
python_requires:
Expand Down
4 changes: 2 additions & 2 deletions sonicprobe/helpers.py
Expand Up @@ -147,10 +147,10 @@ def password_check(value, min_len = 6, max_len = 20, mask = PASSWD_MASK_ALL):
xlen = len(v)

if xlen < min_len:
raise ValueError("length should be at least " + min_len)
raise ValueError("length should be at least %s" % min_len)

if xlen > max_len:
raise ValueError("length should be not be greater than " + max_len)
raise ValueError("length should be not be greater than %s" % max_len)

if mask & PASSWD_MASK_DIGIT:
if not any(char.isdigit() for char in v):
Expand Down

0 comments on commit ff5edfc

Please sign in to comment.