From b6c1d1e36cade1040edbefc9194c5047ca07f8fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Tue, 13 Nov 2018 15:24:27 +0100 Subject: [PATCH] api: ignore empty nonces (#27945) --- wcs/api_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wcs/api_utils.py b/wcs/api_utils.py index 2ee53a235..9f2399b0b 100644 --- a/wcs/api_utils.py +++ b/wcs/api_utils.py @@ -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()) -- 2.19.1