[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-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...



Title: GitLab

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:

Changes:

  • browser/components/torpreferences/content/connectionPane.js
    ... ... @@ -1176,7 +1176,7 @@ function makeBridgeId(bridgeString) {
    1176 1176
     }
    
    1177 1177
     
    
    1178 1178
     function parseBridgeLine(line) {
    
    1179
    -  const re = /^([^\s]+\s+)?([0-9a-fA-F\.\[\]\:]+:[0-9]{1,5})\s*([0-9a-fA-F]{40})(\s+.+)?/;
    
    1179
    +  const re = /^\s*(\S+\s+)?([0-9a-fA-F\.\[\]\:]+:\d{1,5})(\s+[0-9a-fA-F]{40})?(\s+.+)?/;
    
    1180 1180
       const matches = line.match(re);
    
    1181 1181
       if (!matches) {
    
    1182 1182
         return null;
    
    ... ... @@ -1186,7 +1186,7 @@ function parseBridgeLine(line) {
    1186 1186
         bridge.transport = matches[1].trim();
    
    1187 1187
       }
    
    1188 1188
       if (matches[3] !== undefined) {
    
    1189
    -    bridge.id = matches[3].toUpperCase();
    
    1189
    +    bridge.id = matches[3].trim().toUpperCase();
    
    1190 1190
       }
    
    1191 1191
       if (matches[4] !== undefined) {
    
    1192 1192
         bridge.args = matches[4].trim();
    

  • _______________________________________________
    tor-commits mailing list
    tor-commits@xxxxxxxxxxxxxxxxxxxx
    https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits