Browse Source

validation.py: strip leading and trailing whitespaces from hash before processing

pull/1/head
Hidden Z 14 years ago
parent
commit
0cd7556774
  1. 2
      web/lib/validation.py

2
web/lib/validation.py

@ -60,6 +60,8 @@ def validate_b64hash(data, check_uniq=True): @@ -60,6 +60,8 @@ def validate_b64hash(data, check_uniq=True):
"""
Base64 hash validation
"""
# strip leading and trailing whitespaces
data = data.strip()
length = len(data)
# Minimum key length 516 bytes
if length < 516:

Loading…
Cancel
Save