[odrs-web/production] Don't accept fetch requests with an empty app_id



commit 7fb708f44794375488501ac9aa7aae2b6b759e34
Author: Richard Hughes <richard hughsie com>
Date:   Fri Jan 12 12:44:39 2018 +0000

    Don't accept fetch requests with an empty app_id

 app/views.py |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/app/views.py b/app/views.py
index 436d57d..679b0df 100644
--- a/app/views.py
+++ b/app/views.py
@@ -318,6 +318,8 @@ def fetch():
             return json_error('invalid data, expected %s' % key)
         if item[key] is None:
             return json_error('missing data, expected %s' % key)
+        if item[key] is '':
+            return json_error('missing data, expected %s' % key)
 
     # check format
     if not len(item['user_hash']) == 40:


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]