morgan pushed to branch tor-browser-128.8.0esr-14.5-1 at The Tor Project / Applications / Tor Browser

Commits:

1 changed file:

Changes:

  • toolkit/modules/TorConnect.sys.mjs
    ... ... @@ -1227,7 +1227,10 @@ export const TorConnect = {
    1227 1227
             bootstrapOptions.simulateCensorship = true;
    
    1228 1228
             bootstrapOptions.simulateMoatResponse = {
    
    1229 1229
               country: "fi",
    
    1230
    -          settings: [{}, {}],
    
    1230
    +          bridgesList: [
    
    1231
    +            { source: 0, builtin_type: "obfs4" },
    
    1232
    +            { source: 0, builtin_type: "snowflake" },
    
    1233
    +          ],
    
    1231 1234
             };
    
    1232 1235
           }
    
    1233 1236
         } else if (censorshipLevel === 3) {
    
    ... ... @@ -1235,7 +1238,7 @@ export const TorConnect = {
    1235 1238
           bootstrapOptions.simulateCensorship = true;
    
    1236 1239
           bootstrapOptions.simulateMoatResponse = {
    
    1237 1240
             country: null,
    
    1238
    -        settings: [],
    
    1241
    +        bridgesList: [],
    
    1239 1242
           };
    
    1240 1243
         }
    
    1241 1244
       },
    
    ... ... @@ -1412,20 +1415,20 @@ export const TorConnect = {
    1412 1415
               this._setStage(TorConnectStage.ChooseRegion);
    
    1413 1416
               return;
    
    1414 1417
             case TorConnectStage.ChooseRegion:
    
    1415
    -          // TODO: Uncomment for behaviour in tor-browser#42550.
    
    1416
    -          /*
    
    1417
    -          if (regionCode !== "automatic") {
    
    1418
    -            // Not automatic. Go straight to the final error.
    
    1419
    -            this._setStage(TorConnectStage.FinalError);
    
    1418
    +          if (regionCode === "automatic") {
    
    1419
    +            // The automatic region failed.
    
    1420
    +            if (bootstrapAttempt.detectedRegion) {
    
    1421
    +              this._setStage(TorConnectStage.ConfirmRegion);
    
    1422
    +            } else {
    
    1423
    +              this._setStage(TorConnectStage.RegionNotFound);
    
    1424
    +            }
    
    1420 1425
                 return;
    
    1421 1426
               }
    
    1422
    -          */
    
    1423
    -          if (regionCode !== "automatic" || bootstrapAttempt.detectedRegion) {
    
    1424
    -            this._setStage(TorConnectStage.ConfirmRegion);
    
    1425
    -            return;
    
    1426
    -          }
    
    1427
    -          this._setStage(TorConnectStage.RegionNotFound);
    
    1428
    -          return;
    
    1427
    +          // Else, not automatic. Go straight to the final error since the user
    
    1428
    +          // is unlikely to succeed re-selecting the same region and it would be
    
    1429
    +          // unexpected for the user to select a different region.
    
    1430
    +          // See tor-browser#42550.
    
    1431
    +          break;
    
    1429 1432
           }
    
    1430 1433
           this._setStage(TorConnectStage.FinalError);
    
    1431 1434
           return;