Hidden Z
76e4ee94ce
validation.py: add hostname lenght check
...
That's not really needed, just added for avoiding
django.db.utils.DatabaseError exceptions when trying to add too long
hostname with py-i2phosts-injector
2010-10-22 17:47:27 +00:00
Hidden Z
01e01b98fa
validation.py: bugfix: look for '..' in a whole hostname, not in namepart only
2010-10-22 17:15:59 +00:00
Hidden Z
573efddf8b
validation.py: strip leading and trailing whitespaces from hostname
2010-10-22 17:14:30 +00:00
Hidden Z
6a50774e5f
web/lib/validation.py: add comment
2010-10-21 18:47:50 +00:00
Hidden Z
bb2582c62c
web/lib/validation.py: add base64-validity check
...
Base 64 hash shouldn't require more than 2 pad chars to be divided to 4
without leftover.
2010-10-21 18:44:02 +00:00
Hidden Z
2b535dbf2b
web/lib/validation.py: new b64 length check
...
b64 hash shouldn't be longer than 616 bytes. We already have length
limit in database model, but this way we can provide our custom error
message.
2010-10-21 18:40:02 +00:00
Hidden Z
bc3118ab44
web/lib/validation.py: call len() for "data" only once
...
Sort of optimisation.
2010-10-21 18:38:57 +00:00
Hidden Z
f3a79838e6
web/lib/validation.py: fix base64 validations according to zzz's explanation
2010-10-16 19:03:54 +00:00
Hidden Z
2769f0d4bc
Move validation functions to separate module
2010-10-16 18:30:08 +00:00