[tor-commits] [tor-launcher/master] Bug 25089: Special characters not escaped in proxy password
gk at torproject.org
gk at torproject.org
Mon Feb 5 07:51:19 UTC 2018
commit fa8590a497b492f6da62bbf7009735a17e17ec21
Author: Kathy Brade <brade at pearlcrescent.com>
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;
More information about the tor-commits
mailing list