Hidden Z
ac3df58a3f
validation.py: hostname must not start with '.' or '-'
...
I just forgot to add this rule earlier.
14 years ago
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
14 years ago
Hidden Z
01e01b98fa
validation.py: bugfix: look for '..' in a whole hostname, not in namepart only
14 years ago
Hidden Z
573efddf8b
validation.py: strip leading and trailing whitespaces from hostname
14 years ago
Hidden Z
6a50774e5f
web/lib/validation.py: add comment
14 years ago
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.
14 years ago
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.
14 years ago
Hidden Z
bc3118ab44
web/lib/validation.py: call len() for "data" only once
...
Sort of optimisation.
14 years ago
Hidden Z
f3a79838e6
web/lib/validation.py: fix base64 validations according to zzz's explanation
14 years ago
Hidden Z
2769f0d4bc
Move validation functions to separate module
14 years ago