[tor-commits] [stem/master] Fix bug in cache invalidation for CONF_CHANGED

atagar at torproject.org atagar at torproject.org
Mon May 21 01:44:25 UTC 2018


commit 17782bc44f9afbb7dea49085afad29a936b7a1a3
Author: Dave Rolek <dmr-x at riseup.net>
Date:   Mon May 14 18:51:18 2018 +0000

    Fix bug in cache invalidation for CONF_CHANGED
    
    'getconf' cache keys are normalized to lowercase
    
    See #25821
---
 stem/control.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/stem/control.py b/stem/control.py
index b9534f31..bd98f1bc 100644
--- a/stem/control.py
+++ b/stem/control.py
@@ -1064,7 +1064,7 @@ class Controller(BaseController):
 
     def _confchanged_listener(event):
       if self.is_caching_enabled():
-        to_cache = dict((k, None) for k in event.config)
+        to_cache = dict((k.lower(), None) for k in event.config)
         self._set_cache(to_cache, 'getconf')
 
         self._confchanged_cache_invalidation(to_cache)





More information about the tor-commits mailing list