Commit fa8590a4 authored by Kathleen Brade's avatar Kathleen Brade
Browse files

Bug 25089: Special characters not escaped in proxy password

Modify the _strEscape() function to enclose strings in double
quotes when they contain a '#' character.
parent 34d78bed
// 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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment