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/e6cc145a...
tor-commits@lists.torproject.org