From 0cd75567748bcf05cf84f403f3a79efd956ac558 Mon Sep 17 00:00:00 2001 From: Hidden Z Date: Fri, 22 Oct 2010 19:31:02 +0000 Subject: [PATCH] validation.py: strip leading and trailing whitespaces from hash before processing --- web/lib/validation.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/web/lib/validation.py b/web/lib/validation.py index 70a66a2..3d076b8 100644 --- a/web/lib/validation.py +++ b/web/lib/validation.py @@ -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: