mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-21 11:35:34 +01:00
[PM-2793] Modified bad base URL logic to not also catch web app (#5699)
* Modified bad base URL logic to not also catch web app. * Removed EU from check.
This commit is contained in:
parent
f8c1e6c60a
commit
3185c0a61b
@ -159,15 +159,14 @@ export class EnvironmentService implements EnvironmentServiceAbstraction {
|
||||
const savedUrls = await this.stateService.getEnvironmentUrls();
|
||||
const envUrls = new EnvironmentUrls();
|
||||
|
||||
// fix environment urls for old users
|
||||
if (savedUrls.base === "https://vault.bitwarden.com") {
|
||||
// In release `2023.5.0`, we set the `base` property of the environment URLs to the US web vault URL when a user clicked the "US" region.
|
||||
// This check will detect these cases and convert them to the proper region instead.
|
||||
// We are detecting this by checking for the presence of the web vault URL in the `base` and the absence of the `notifications` property.
|
||||
// This is because the `notifications` will not be `null` in the web vault, and we don't want to migrate the URLs in that case.
|
||||
if (savedUrls.base === "https://vault.bitwarden.com" && savedUrls.notifications == null) {
|
||||
await this.setRegion(Region.US);
|
||||
return;
|
||||
}
|
||||
if (savedUrls.base === "https://vault.bitwarden.eu") {
|
||||
await this.setRegion(Region.EU);
|
||||
return;
|
||||
}
|
||||
|
||||
switch (region) {
|
||||
case Region.EU:
|
||||
|
Loading…
Reference in New Issue
Block a user