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

[tor-commits] [stem/master] Controller's get_conf_map concurrently modified dictionary



commit b5aecb743d33db1a6378d59792d8e57305b6c6f2
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date:   Fri Jun 14 11:56:04 2019 -0700

    Controller's get_conf_map concurrently modified dictionary
    
    Oddly I'm not reproing this issue when I run the tests, but I definitely see
    the bug. Iteration requires a shallow copy of the dictionary's keys.
    
      https://trac.torproject.org/projects/tor/ticket/30882
---
 stem/control.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/stem/control.py b/stem/control.py
index a821634a..d8423ffa 100644
--- a/stem/control.py
+++ b/stem/control.py
@@ -2361,7 +2361,7 @@ class Controller(BaseController):
       # entries since the user didn't request those by their key, so we can't
       # be sure what they wanted.
 
-      for key in reply:
+      for key in list(reply):
         if not key.lower() in MAPPED_CONFIG_KEYS.values():
           user_expected_key = _case_insensitive_lookup(params, key, key)
 

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