[tor-commits] [bridgedb/master] Add GIMP_CAPTCHA_ENABLED and GIMP_CAPTCHA_DIR options.

isis at torproject.org isis at torproject.org
Sun Mar 16 19:04:57 UTC 2014


commit 08624169a25d601c336706e48db4405921011260
Author: Isis Lovecruft <isis at torproject.org>
Date:   Sat Mar 1 01:38:51 2014 +0000

    Add GIMP_CAPTCHA_ENABLED and GIMP_CAPTCHA_DIR options.
---
 bridgedb.conf        |   11 ++++++++++-
 lib/bridgedb/Main.py |    3 ++-
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/bridgedb.conf b/bridgedb.conf
index d223875..f1bf16c 100644
--- a/bridgedb.conf
+++ b/bridgedb.conf
@@ -15,11 +15,14 @@
 #           for details.
 # :copyright: (c) 2007-2013 The Tor Project, Inc.
 #             (c) 2007-2013, all sentient entities within the AUTHORS file
-# :version: 0.0.3
+# :version: 0.0.5
 #===============================================================================
 #
 # CHANGELOG:
 # ~~~~~~~~~~ 
+# Changes in version 0.0.5 - 2014-02-27
+#   * ADD GIMP_CAPTCHA_ENABLED and GIMP_CAPTCHA_DIR settings (see #10809).
+#
 # Changes in version 0.0.4 - 2014-01-24
 #   * ADD COLLECT_TIMESTAMPS option (see #10724). Set it to False for the
 #     staging instance (etc/test-bridgedb.conf), and True for the production
@@ -226,6 +229,12 @@ RECAPTCHA_PRIV_KEY = ''
 # The remoteip we send to reCAPTCHA during verification
 RECAPTCHA_REMOTEIP = ''
 
+# If true, use a local cache of generated CAPTCHAs:
+GIMP_CAPTCHA_ENABLED = True
+
+# The directory for the local CAPTCHA cache:
+GIMP_CAPTCHA_DIR = 'captchas'
+
 #-------------------------------
 # Email Distribution Options    \
 #------------------------------------------------------------------------------
diff --git a/lib/bridgedb/Main.py b/lib/bridgedb/Main.py
index 36e4e88..be8b1b0 100644
--- a/lib/bridgedb/Main.py
+++ b/lib/bridgedb/Main.py
@@ -282,7 +282,8 @@ def loadConfig(configFile=None, configCls=None):
 
     for attr in ["DB_FILE", "DB_LOG_FILE", "MASTER_KEY_FILE", "PIDFILE",
                  "ASSIGNMENTS_FILE", "HTTPS_CERT_FILE", "HTTPS_KEY_FILE",
-                 "LOG_FILE", "STATUS_FILE", "COUNTRY_BLOCK_FILE"]:
+                 "LOG_FILE", "STATUS_FILE", "COUNTRY_BLOCK_FILE",
+                 "GIMP_CAPTCHA_DIR"]:
         setting = getattr(config, attr, None)
         if setting is None:
             setattr(config, attr, setting)





More information about the tor-commits mailing list