[tor-commits] [gettor/master] Fix too many requests check

hiro at torproject.org hiro at torproject.org
Wed Oct 16 11:43:57 UTC 2019


commit 5450f3084e3ce588403336467f7c1347f013c05c
Author: hiro <hiro at torproject.org>
Date:   Wed Oct 16 13:43:53 2019 +0200

    Fix too many requests check
---
 gettor/parse/email.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gettor/parse/email.py b/gettor/parse/email.py
index ba69347..c9f527a 100644
--- a/gettor/parse/email.py
+++ b/gettor/parse/email.py
@@ -228,6 +228,7 @@ class EmailParser(object):
         now_str = datetime.now().strftime("%Y%m%d%H%M%S")
         dbname = self.settings.get("dbname")
         hid = hashlib.sha256(request['id'].encode('utf-8'))
+        request_service = request['service']
         conn = SQLite3(dbname)
 
         if request["command"]:
@@ -241,7 +242,7 @@ class EmailParser(object):
             )
 
             check = self.too_many_requests(
-                request['id'], hid, request['service'], num_request, email_requests_limit
+                request['id'], hid, request_service, num_request, email_requests_limit
             )
 
             if check:



More information about the tor-commits mailing list