forked from 00dani/lemoncurry
Harmlessly ignore bad params to Libravatar
I was throwing 400s when bad parameters are provided, but the spec actually says you're supposed to just ignore them entirely.
This commit is contained in:
parent
7fcc3c8788
commit
76496e7169
1 changed files with 2 additions and 2 deletions
|
@ -21,9 +21,9 @@ def libravatar(request, hash):
|
|||
try:
|
||||
size = int(size)
|
||||
except ValueError:
|
||||
return utils.bad_req('size parameter must be an integer')
|
||||
size = 80
|
||||
if not 1 <= size <= 512:
|
||||
return utils.bad_req('size parameter must be between 1 and 512')
|
||||
size = 512
|
||||
|
||||
if len(hash) == 32:
|
||||
where = Q(email_md5=hash)
|
||||
|
|
Loading…
Reference in a new issue