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

[tor-commits] [tor-launcher/master] Bug 25089: Special characters not escaped in proxy password



commit fa8590a497b492f6da62bbf7009735a17e17ec21
Author: Kathy Brade <brade@xxxxxxxxxxxxxxxxx>
Date:   Fri Feb 2 10:59:55 2018 -0500

    Bug 25089: Special characters not escaped in proxy password
    
    Modify the _strEscape() function to enclose strings in double
    quotes when they contain a '#' character.
---
 src/components/tl-protocol.js | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/components/tl-protocol.js b/src/components/tl-protocol.js
index a89b84d..ab33bd3 100644
--- a/src/components/tl-protocol.js
+++ b/src/components/tl-protocol.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, The Tor Project, Inc.
+// Copyright (c) 2018, The Tor Project, Inc.
 // See LICENSE for licensing information.
 // TODO: Some code came from torbutton.js (pull in copyright and license?)
 //
@@ -1046,8 +1046,8 @@ TorProtocolService.prototype =
   // Returns the new string.
   _strEscape: function(aStr)
   {
-    // Just return if all characters are printable ASCII excluding SP and "
-    const kSafeCharRE = /^[\x21\x23-\x7E]*$/;
+    // Just return if all characters are printable ASCII excluding SP, ", and #
+    const kSafeCharRE = /^[\x21\x24-\x7E]*$/;
     if (!aStr || kSafeCharRE.test(aStr))
       return aStr;
 

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