api: ignore empty nonces (#27945)
This commit is contained in:
parent
18dedba966
commit
c6e536e02e
|
@ -71,7 +71,7 @@ def is_url_signed(utcnow=None, duration=DEFAULT_DURATION):
|
|||
% (duration, delta))
|
||||
# check nonce
|
||||
nonce = get_request().form.get('nonce')
|
||||
if nonce is not None:
|
||||
if nonce:
|
||||
# compute end date of the nonce as an unix timestamp
|
||||
until = timestamp + datetime.timedelta(seconds=duration)
|
||||
until = calendar.timegm(until.timetuple())
|
||||
|
|
Loading…
Reference in New Issue