[tbb-commits] [Git][tpo/applications/tor-browser][tor-browser-102.12.0esr-12.5-1] fixup! Bug 31286: Implementation of bridge, proxy, and firewall settings in...
richard (@richard)
git at gitlab.torproject.org
Mon Jun 5 19:46:46 UTC 2023
richard pushed to branch tor-browser-102.12.0esr-12.5-1 at The Tor Project / Applications / Tor Browser
Commits:
e6cc145a by Pier Angelo Vendrame at 2023-06-05T19:46:15+00:00
fixup! Bug 31286: Implementation of bridge, proxy, and firewall settings in about:preferences#connection
Bug 41802: Improve the regex on parseBridgeLine
The previous version of the regex took for granted the bridge
fingerprint was always available, but it is actually optional.
So, parsing some bridge lines (e.g., Conjure) failed, and vanilla
bridge was displayed instead of the actual transport.
- - - - -
1 changed file:
- browser/components/torpreferences/content/connectionPane.js
Changes:
=====================================
browser/components/torpreferences/content/connectionPane.js
=====================================
@@ -1176,7 +1176,7 @@ function makeBridgeId(bridgeString) {
}
function parseBridgeLine(line) {
- const re = /^([^\s]+\s+)?([0-9a-fA-F\.\[\]\:]+:[0-9]{1,5})\s*([0-9a-fA-F]{40})(\s+.+)?/;
+ const re = /^\s*(\S+\s+)?([0-9a-fA-F\.\[\]\:]+:\d{1,5})(\s+[0-9a-fA-F]{40})?(\s+.+)?/;
const matches = line.match(re);
if (!matches) {
return null;
@@ -1186,7 +1186,7 @@ function parseBridgeLine(line) {
bridge.transport = matches[1].trim();
}
if (matches[3] !== undefined) {
- bridge.id = matches[3].toUpperCase();
+ bridge.id = matches[3].trim().toUpperCase();
}
if (matches[4] !== undefined) {
bridge.args = matches[4].trim();
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/e6cc145a65cb3a22e57d2fa8c8e8f9562c3b8975
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/e6cc145a65cb3a22e57d2fa8c8e8f9562c3b8975
You're receiving this email because of your account on gitlab.torproject.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.torproject.org/pipermail/tbb-commits/attachments/20230605/1f71e068/attachment-0001.htm>
More information about the tbb-commits
mailing list