1
0
mirror of https://github.com/r4sas/py-i2phosts synced 2025-02-02 09:55:52 +00:00

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

This commit is contained in:
Hidden Z 2010-10-22 19:31:02 +00:00
parent 584d113a06
commit 0cd7556774

View File

@ -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: