Allow sizes up to 512 when requesting libravatars, since that's what the spec says actually and I just misread it I guess?

This commit is contained in:
Danielle McLean 2018-06-05 10:14:24 +10:00
parent f551a5214a
commit 8932317f08
Signed by untrusted user: 00dani
GPG key ID: 8EB789DDF3ABD240

View file

@ -19,8 +19,8 @@ def libravatar(request, hash):
size = int(size) size = int(size)
except ValueError: except ValueError:
return utils.bad_req('size parameter must be an integer') return utils.bad_req('size parameter must be an integer')
if not 1 <= size <= 128: if not 1 <= size <= 512:
return utils.bad_req('size parameter must be between 1 and 128') return utils.bad_req('size parameter must be between 1 and 512')
if len(hash) == 32: if len(hash) == 32:
where = {'email_md5': hash} where = {'email_md5': hash}