8000 PM-13691: Fix managed EU base URL setting returns US environment URLs by matt-livefront · Pull Request #1067 · bitwarden/ios · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

PM-13691: Fix managed EU base URL setting returns US environment URLs #1067

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 23, 2024

Conversation

matt-livefront
Copy link
Collaborator
@matt-livefront matt-livefront commented Oct 22, 2024

🎟️ Tracking

PM-13691 - Managed base URL setting of EU returns US environment URLs
PM-13443 - User lands on empty SSO identifier screen even with claimed domain

📔 Objective

Previously, if the managed base URL or a self-hosted base URL was set to the EU server (https://vault.bitwarden.eu), the app would still use US environment URLs. If the URLs are for a self-hosted region, the app uses the self-hosted base URL to construct the URLs. Otherwise, we were assuming EnvironmentUrlData was fully populated. If only the base URL was set, it would default to the US URLs instead of constructing the URLs based on the base URL.

Instead, if the URL's region is for US or EU, we should use the default US or EU URLs rather than relying on the passed in URLs.

if environmentUrlData.region == .selfHosted, let base = environmentUrlData.base {
apiURL = base.appendingPathComponent("api")
baseURL = base
eventsURL = base.appendingPathComponent("events")
iconsURL = base.appendingPathComponent("icons")
identityURL = base.appendingPathComponent("identity")
webVaultURL = base
} else {
apiURL = environmentUrlData.api ?? URL(string: "https://api.bitwarden.com")!
baseURL = environmentUrlData.base ?? URL(string: "https://vault.bitwarden.com")!
eventsURL = environmentUrlData.events ?? URL(string: "https://events.bitwarden.com")!
iconsURL = environmentUrlData.icons ?? URL(string: "https://icons.bitwarden.net")!
identityURL = environmentUrlData.identity ?? URL(string: "https://identity.bitwarden.com")!
webVaultURL = environmentUrlData.webVault ?? URL(string: "https://vault.bitwarden.com")!

⏰ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team

🦮 Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or ℹ️ (:information_source:) for notes or general info
  • ❓ (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • ❌ (:x:) or ⚠️ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes
  • 8000

Copy link
Contributor

Logo
Checkmarx One – Scan Summary & Details3b3bb82a-0704-4b46-8bc5-2f2883425feb

No New Or Fixed Issues Found

Copy link
codecov bot commented Oct 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.37%. Comparing base (cee1ad4) to head (b64b56b).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1067   +/-   ##
=======================================
  Coverage   89.37%   89.37%           
=======================================
  Files         672      672           
  Lines       42364    42371    +7     
=======================================
+ Hits        37861    37870    +9     
+ Misses       4503     4501    -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@matt-livefront matt-livefront merged commit fe3f6bd into main Oct 23, 2024
9 checks passed
@matt-livefront matt-livefront deleted the matt/PM-13691-self-hosted-eu branch October 23, 2024 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0