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

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



commit 5450f3084e3ce588403336467f7c1347f013c05c
Author: hiro <hiro@xxxxxxxxxxxxxx>
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:

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits