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:
parent
584d113a06
commit
0cd7556774
@ -60,6 +60,8 @@ def validate_b64hash(data, check_uniq=True):
|
|||||||
"""
|
"""
|
||||||
Base64 hash validation
|
Base64 hash validation
|
||||||
"""
|
"""
|
||||||
|
# strip leading and trailing whitespaces
|
||||||
|
data = data.strip()
|
||||||
length = len(data)
|
length = len(data)
|
||||||
# Minimum key length 516 bytes
|
# Minimum key length 516 bytes
|
||||||
if length < 516:
|
if length < 516:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user