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

[tor-commits] [tor-browser-bundle/master] Unset TOR_CONTROL_PASSWD in setControlPassword() if autoset to '"secret"'.



commit 798f147f44ff80d2104ed3b0162f17198dd2a4f2
Author: Isis Lovecruft <isis@xxxxxxxxxxxxxx>
Date:   Wed Jul 16 02:33:00 2014 +0000

    Unset TOR_CONTROL_PASSWD in setControlPassword() if autoset to '"secret"'.
    
     * FIXES #12624, a bug caused by the TOR_CONTROL_PASSWD being by
       default set to '"secret"' in the example, and then mistakenly not
       unset in the setControlPasswd() function.
---
 RelativeLink/RelativeLink.sh |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/RelativeLink/RelativeLink.sh b/RelativeLink/RelativeLink.sh
index 4e6b7bb..e75482a 100755
--- a/RelativeLink/RelativeLink.sh
+++ b/RelativeLink/RelativeLink.sh
@@ -220,7 +220,12 @@ export LD_LIBRARY_PATH
 
 function setControlPortPasswd() {
     local ctrlPasswd=$1
-    test -z "$ctrlPasswd" -o "$ctrlPasswd" = $'\"secret\"' && return
+
+    if test -z "$ctrlPasswd" -o "$ctrlPasswd" = $'\"secret\"' ; then
+        unset TOR_CONTROL_PASSWD
+        return
+    fi
+
     if test "${ctrlPasswd:0:1}" = $'\"'; then  # First 2 chars were '"
         printf "Using system Tor process.\n"
         export TOR_CONTROL_PASSWD

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