Skip to content
Snippets Groups Projects
Verified Commit c2911585 authored by Pier Angelo Vendrame's avatar Pier Angelo Vendrame :jack_o_lantern:
Browse files

fixup! Bug 31286: Implementation of bridge, proxy, and firewall settings in...

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.
parent 25a70ab1
Branches
No related tags found
1 merge request!694Bug 41796: Rebased on top of FIREFOX_ESR_115_BASE
......@@ -1167,7 +1167,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+.+)?/;
/^\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;
......@@ -1177,7 +1177,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();
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment