Adds urlOriginsMatch to @bitwarden/platform, which compares two URLs by
scheme, host, and port. Uses `protocol + "//" + host` rather than
`URL.origin` because non-special schemes (e.g. chrome-extension://)
return the opaque string "null" from .origin, making equality comparison
unreliable. URLs without a host (file:, data:) are explicitly rejected
to prevent hostless schemes from comparing equal.
Refactors senderIsInternal to delegate to urlOriginsMatch and to derive
the extension URL via BrowserApi.getRuntimeURL("") rather than inline
chrome/browser API detection. Adds full test coverage for
senderIsInternal.
The previous string-based comparison used startsWith after stripping
trailing slashes, which was safe in senderIsInternal where inputs are
tightly constrained. As a general utility accepting arbitrary URLs,
startsWith can produce false positives (e.g. "https://example.com"
matching "https://example.com.evil.com"). Structural host comparison
is the correct contract for unrestricted input.
Upgrade Angular to v19 using the update guide.
- Add `standalone: false` to any missed component in stories or tests.
- Update jest.config to follow the new best practices.
* docs: fix a typo
* fix(browser): restore timer-based background syncs
The browser extension was not performing scheduled background syncs every 30 minutes as expected. This was due to missing task scheduling code that was accidentally removed during the web push implementation (PR #11346).
This commit:
- Creates a new BackgroundSyncService to manage sync scheduling
- Properly initializes the sync interval in main.background.ts
- Adds a test to ensure the sync initialization code isn't accidentally removed again
- Organizes platform module structure to support the new service
Fixes PM-19396
* review: remove unecassary await keyword
Fail tests when relying on unknownProperties or unknownElements. Existing instances are whitelist and have tickets created and assigned to the relevant teams.
Update all libs to use explicit dependencies rather than relying on tsconfig.libs.json. This allows us to more easily understand the dependencies between libs and prevent users from accidentally adding new dependencies.
We still use tsconfig.libs (now renamed tsconfig.spec) for tests.