1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-06 00:13:28 +00:00
Commit Graph

5696 Commits

Author SHA1 Message Date
Matt Gibson
7550d1109a [PM-28038][PM-28276] Ignore url case for origin matching (#17355)
* ignore url case for origin matching

* Fixup typo

* Inject log services

(cherry picked from commit c67715ea29)
2025-11-17 12:14:52 -08:00
Github Actions
2c35806ffa Bumped Desktop client to 2025.11.1
(cherry picked from commit 7ba3924a4f)
2025-11-16 12:38:57 -05:00
Matt Gibson
19b992c382 [PM-27888] [PM-27889][PM-27914][PM-27820] Use frame Id as test for internal source. (#17266)
* Use frame Id as test for internal source.

* prefer strong equality

* Fix tests

(cherry picked from commit 40ec682b78)
2025-11-07 11:32:19 -08:00
Matt Gibson
d664d314a3 PM-27820 (#17245)
* limit port to internal communications

* A few more internal-only ports

* fixup tests

disabled tests that are now failing with a race condition.

* Remove autofill team review requirement

(cherry picked from commit 57b8f18cdd)
(cherry picked from commit 551d80dfa0)
2025-11-07 11:32:05 -08:00
Matt Gibson
00c27dc8c8 Arch/pm 27820 (#17241)
* add storage port validation

* remove unused method

* Prefer property presence over truthyness

(cherry picked from commit cbf380e023)
(cherry picked from commit 33149f79cb)
2025-11-07 11:31:51 -08:00
Will Martin
6dfc8af46d [PM-26944] fix(browser/phishing-detection): fix various issues (#17197)
(cherry picked from commit 1be9e19fad)
2025-11-06 16:12:01 -05:00
Robyn MacCallum
0bec4cd493 Pass cipherId in bgHandleReprompt (#17256) 2025-11-06 10:54:55 -05:00
Dave
943a186f4f fix(desktop-app-component) [PM-27467]: Remove early call of updateAppMenu on logout; await broadcastService handling of loggedOut to update app menu to prevent evaluation of activeUserState. (#17219)
(cherry picked from commit e6c2786dcc)
2025-11-04 15:38:03 -05:00
Will Martin
a1580f8aea [PM-26944] phishing data checksum diffing + daily patches (#16983)
* expose local db file to extension

* fetch from local db as fallback; only fetch new data on changed checksum; fetch from cdn

* check for undefined chrome runtime (for easy Storybook mocking)

* update capital letters lint

* add audit api tests

* add bash script to fetch local db info and split it to meet FF size limits

* add readme

* Rename README.md to readme.md

* remove leftover file

* remove unused methods from audit service

* remove local db logic

* wip

* revert local db build changes

* add tests; sub to updates directly; refactor teardown logic

* fix eslint crashing

* remove temp premium override

* remove unused test

* update timer value

* run prettier

* refetch all domains on app version change

* fix log statement

* harden fetching

* filter empty domains

* fix type issue

* fix typo

* fix type error

* fix cleanup

(cherry picked from commit 7ac6a67835)
2025-11-03 10:16:36 -05:00
Github Actions
b4420d770e Bumped client version(s) 2025-11-03 14:27:34 +00:00
Todd Martin
cd56d01894 chore(deps): Platform: Update electron to v37
* [deps] Platform: Update electron to v37

* Updated electron-builder.json

* Updated electron-builder latest 37 minor.

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-02 14:23:18 -05:00
Jordan Aasen
b102ee4bdf [PM-26653] - fix uri match strategy logic (#17142)
* fix uri match strategy logic

* fix variable name

* update logic and specs

* add test case
2025-11-02 08:14:30 -08:00
Bernd Schoolmann
e68a471655 [PM-26340] Enable linux biometrics v2 (#16661) 2025-10-31 22:47:17 +01:00
Ben Brooks
b5a7379ea9 feat(policies): PM-25570 Admin Console UI for URI Match Default Policy (#16752)
Admin Console UI for URI Match Default Policy

---------

Signed-off-by: Ben Brooks <bbrooks@bitwarden.com>
Co-authored-by: Jonathan Prusik <jprusik@users.noreply.github.com>
2025-10-31 13:50:45 -07:00
Alex
4d1c00a5bc [PM-26941] all caught up state for review card (#17164)
* add "All caught up!" state for application review card

- Display success state when all applications have been reviewed and no new applications need review
- Add iconColorClass input to activity-card component to support conditional icon colors (green checkmark for success state)
- Add i18n keys: allCaughtUp and noNewApplicationsToReviewAtThisTime
- Check if all apps have review dates via enrichedReportData$ to determine when to show the caught up state

* fix "Potential Race Condition with State Initialization" from claude issue and replace getter
2025-10-31 13:37:21 -07:00
Brandon Treston
2da0b48c3d [PM-27688] fix events page not loading (#17166)
* remove unneeded rxjs filter

* add check for canManage

* add null check

* fix provider ID, clean up
2025-10-31 20:35:59 +00:00
Brandon Treston
98622a3f73 remove unneeded rxjs filter (#17165) 2025-10-31 19:46:04 +00:00
bw-ghapp[bot]
b7759abb20 Autosync the updated translations (#17145)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2025-10-31 17:49:04 +00:00
bw-ghapp[bot]
1476dce396 Autosync the updated translations (#17146)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2025-10-31 17:57:55 +01:00
Oscar Hinton
8c185c9d2b [PM-27645] Check signature of helper exe (#17155) 2025-10-31 16:50:13 +01:00
Oscar Hinton
443b85a356 [PM-27641] Enable signature validation (#17150)
Enables the currently disabled signature validation. This is a blocker for release.
2025-10-31 16:13:41 +01:00
Oscar Hinton
4c1eba2086 [PM-27583] Add icon to chromium import helper (#17126)
Adds an icon to the windows binary.

---------

Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
2025-10-31 10:10:22 +01:00
bw-ghapp[bot]
9d2b2d1894 Autosync the updated translations (#17144)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2025-10-31 09:57:01 +01:00
Andreas Coroiu
8aebfbeace [PM-25932] Shorten socket paths (#17093)
* feat: shorten socket paths

* fix: No such file or directory error

* feat: remove tmp folder from path

* fix: No such file or directory autofill error
2025-10-31 08:15:04 +01:00
Andreas Coroiu
48fb8b2bfe [PM-25250] Prevent configuration and access of self hosted urls over http (#17095)
* feat: ban urls not using https

* feat: add exception for dev env

* feat: block fetching of insecure URLs

* feat: add exception for dev env

* feat: block notifications from using insecure URL

* fix: bug where submission was possible regardless of error

* feat: add exception for dev env

* fix: missing constructor param
2025-10-31 08:12:44 +01:00
Nick Krantz
326cd40628 cipher.id now defaults to an empty string rather than null/undefined - use bang to transform into a boolean (#17137) 2025-10-30 15:44:49 -05:00
Jordan Aasen
4a71503875 [PM-27642] - fix mp reprompt issue (#17131)
* fix mp reprompt issue

* fix logic. add more specs

* update vault popup autofill spec

* update jsdoc
2025-10-30 13:19:12 -07:00
Shane Melton
0d543c7059 [PM-27055] Use undefined instead of null for folder/organization filtering (#17120) 2025-10-30 13:18:32 -07:00
Alex
fdfcee4bc5 [26908] improve empty state design (#16832)
* max init

* add mp4 and organize code better

* fix lint errors

* move empty state logic into risk insights component

* replace getter logic

* sub for org name

* checkForVaultItems fix
- need to use cipherservice instead of report results from data service

* fix all critical issues mentioned by claude bot

* resolve empty state logic bug and memory leaks

- Handle zero-results case in empty state logic
- Add takeUntil cleanup to _setupUserId subscription
- Guard console.warn with isDevMode() check

* use tuple arrays for benefits to prevent XSS risk

Replace pipe-separated strings with typed tuple arrays [string, string][]
for benefits data in empty state component. This eliminates potential XSS
risk from string splitting, provides compile-time type safety, and improves
performance by removing runtime string parsing on every change detection.

* fix(dirt): hide empty states during report generation and fix memory leak

Add isGeneratingReport$ to combineLatest, update empty state conditions
to check !isGenerating, simplify run report logic, and fix memory leak
in route.queryParams subscription.

Addresses Claude bot feedback on PR #16832

* refactor(dirt): use signals and OnPush in empty state card component

Convert @Input() to readonly input signals and add OnPush change
detection strategy. Update template to call signals as functions.
Fixes ESLint compliance issues.

* refactor(dirt): remove unused shouldShowRunReportState variable

The shouldShowRunReportState variable was calculated but never used.
The template already uses @else for the run report state, making this
variable redundant.

* refactor(dirt): consolidate duplicate if statements in empty state logic

Merge 5 separate if/else blocks checking shouldShowImportDataState into
single consolidated block. Move constant benefits assignment outside
conditional. Improves readability and reduces duplication.

* remove unnecessary getOrganizationName wrapper method

* remove duplicate runReport method

Remove runReport arrow function and use generateReport consistently.
Both methods called dataService.triggerReport(), but generateReport
includes an organizationId check for defensive programming.
2025-10-30 12:16:41 -07:00
Alex
2b009778e8 [PM-27284] new applications card real data (#17088)
* feat(dirt): add newApplications$ observable to orchestrator

Add reactive observable that filters applicationData for unreviewed apps
(reviewedDate === null). Observable automatically updates when report
state changes through the pipeline.

- Add newApplications$ observable with distinctUntilChanged
- Filters rawReportData$.data.applicationData
- Uses shareReplay for multi-subscriber efficiency

Related to PM-27284

* feat(dirt): add saveApplicationReviewStatus$ to orchestrator

Implement method to save application review status and critical flags.
Updates all applications where reviewedDate === null to set current date,
and marks selected applications as critical.

- Add saveApplicationReviewStatus$() method
- Add _updateReviewStatusAndCriticalFlags() helper
- Uses existing encryption and API update patterns
- Single API call for both review status and critical flags
- Follows same pattern as saveCriticalApplications$()

Related to PM-27284

* feat(dirt): expose newApplications$ in data service

Expose orchestrator's newApplications$ observable and save method
through RiskInsightsDataService facade. Maintains clean separation
between orchestrator (business logic) and components (UI).

- Expose newApplications$ observable
- Expose saveApplicationReviewStatus() delegation method
- Maintains facade pattern consistency

Related to PM-27284

* feat(dirt): make AllActivitiesService reactive to new applications

Update AllActivitiesService to subscribe to orchestrator's newApplications$
observable instead of receiving data through summary updates.

- Subscribe to dataService.newApplications$ in constructor
- Add setNewApplications() helper method
- Remove newApplications update from setAllAppsReportSummary()
- New applications now update reactively when review status changes

Related to PM-27284

* feat(dirt): connect dialog to review status save method

Update NewApplicationsDialogComponent to call the data service's
saveApplicationReviewStatus method when marking applications as critical.

- Inject RiskInsightsDataService
- Replace placeholder onMarkAsCritical() with real implementation
- Handle success/error cases with appropriate toast notifications
- Close dialog on successful save
- Show different messages based on whether apps were marked critical

Related to PM-27284

* feat(dirt): add i18n strings for application review

Add internationalization strings for the new applications review dialog
success and error messages.

- applicationReviewSaved: Success toast title
- applicationsMarkedAsCritical: Success message when apps marked critical
- newApplicationsReviewed: Success message when apps reviewed only
- errorSavingReviewStatus: Error toast title
- pleaseTryAgain: Error toast message

Related to PM-27284

* fix(dirt): add subscription cleanup to AllActivitiesService

Critical fix for production code quality and memory leak prevention.
Adds takeUntil pattern to all subscriptions to comply with ADR-0003
(Observable Data Services) requirements.

**Subscription Cleanup (ADR-0003 Compliance):**
- Add takeUntil pattern to AllActivitiesService subscriptions
- Add _destroy$ Subject and destroy() method
- Prevents memory leaks by properly unsubscribing from observables
- Follows Observable Data Services ADR requirements

Changes:
- Import Subject and takeUntil from rxjs
- Add private _destroy$ Subject for cleanup coordination
- Apply takeUntil(this._destroy$) to all 3 subscriptions:
  - enrichedReportData$ subscription
  - criticalReportResults$ subscription
  - newApplications$ subscription
- Add destroy() method for proper resource cleanup

This ensures proper resource cleanup and follows Bitwarden's
architectural decision records for observable management.

Related to PM-27284

* fix(dirt): replace manual takeUntil with takeUntilDestroyed in AllActivitiesService

Fixes critical memory leak by replacing manual subscription cleanup
with Angular's automatic DestroyRef-based cleanup pattern.

**Changes:**
- Replace `takeUntil(this._destroy$)` with `takeUntilDestroyed()` for all 3 subscriptions
- Remove unused `_destroy$` Subject and manual `destroy()` method
- Update imports to use `@angular/core/rxjs-interop`

**Why:**
- Manual `destroy()` method was never called anywhere in codebase
- Subscriptions accumulated without cleanup, causing memory leaks
- `takeUntilDestroyed()` uses Angular's DestroyRef for automatic cleanup
- Aligns with ADR-0003 and .claude/CLAUDE.md requirements

**Impact:**
- Automatic subscription cleanup when service context is destroyed
- Prevents memory leaks during hot module reloads and route changes
- Reduces code complexity (no manual lifecycle management needed)

Related to PM-27284

* refactor(dirt): remove newApplications from OrganizationReportSummary

Removes redundant newApplications field from summary type and uses
derived newApplications$ observable from orchestrator instead.

**Changes:**
- Remove newApplications from OrganizationReportSummary type definition
- Remove dummy data array from RiskInsightsReportService.getApplicationsSummary()
- Remove newApplications subscription from AllActivitiesService
- Update AllActivityComponent to subscribe directly to dataService.newApplications$

**Why:**
- Eliminates data redundancy (stored vs derived)
- newApplications$ already computes from applicationData.reviewedDate === null
- Single source of truth: applicationData is the source
- Simplifies encrypted payload (less data in summary)
- Better separation: stored data (counts) vs computed data (lists)

**Impact:**
- No functional changes - UI continues to display new applications correctly
- Cleaner architecture with computed observable pattern

* cleanup

* fix(dirt): improve dialog type safety and error logging

Addresses critical PR review issues in NewApplicationsDialogComponent:

**Type Safety:**
- Replace unsafe type casting `(this as any).dialogRef` with proper DialogRef injection
- Inject DialogRef<boolean | undefined> using Angular's inject() function
- Ensures type safety and prevents runtime errors from missing dialogRef

**Error Handling:**
- Add LogService to dialog component
- Log errors with "[NewApplicationsDialog]" for debugging
- Maintain user-facing error toast while adding server-side logging

**Impact:**
- Eliminates TypeScript safety bypasses
- Improves production debugging capabilities
- Follows Angular dependency injection best practices

* fixing mock data and test cases for new apps

* refactor(dirt): remove newApplications validation from OrganizationReportSummary type guard

Removes redundant newApplications field validation from the
OrganizationReportSummary type guard and related test cases.

**Changes:**
- Remove "newApplications" from allowed keys in isOrganizationReportSummary()
- Remove newApplications array validation logic
- Remove newApplications validation from validateOrganizationReportSummary()
- Remove 2 test cases for newApplications validation
- Remove newApplications field from 8 test data objects

**Rationale:**
The newApplications field was removed from OrganizationReportSummary type
definition because it's derived data that can be calculated from
applicationData (filtering where reviewedDate === null). The data is now
accessed via the reactive newApplications$ observable instead of being
stored redundantly in the summary object.

**Impact:**
- No functional changes - UI continues to display new applications via observable
- Type guard now correctly validates the actual OrganizationReportSummary structure
- Eliminates data redundancy and maintains single source of truth
- All 43 tests passing

---------

Co-authored-by: Tom <ttalty@bitwarden.com>
2025-10-30 11:13:01 -07:00
Jordan Aasen
1e5c0ac41f add reprompt. fix logic (#17122) 2025-10-30 08:57:48 -07:00
rr-bw
d8e5a524d4 style(sso-login): (Auth) [PM-26535] Make SSO Button Primary if ssoRequired (#16757)
When SSO is required:
- Make the SSO button primary
- Add a tooltip to the disabled buttons

When SSO is not required:
- SSO button remains secondary
- No tooltip on the buttons

Feature Flags enabled: pm-22110-disable-alternate-login-methods
2025-10-30 14:41:17 +00:00
Dmitry Yakimenko
dcf8c1d83b [PM-25855][PM-24948][PM-24947] Chromium import functionality with application bound encryption on Windows (#16429)
Adds application bound encryption in order to support chrome imports on windows.

---------

Co-authored-by: Daniel James Smith <2670567+djsmith85@users.noreply.github.com>
Co-authored-by: adudek-bw <adudek@bitwarden.com>
Co-authored-by: Hinton <hinton@users.noreply.github.com>
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
2025-10-30 13:18:30 +01:00
cyprain-okeke
e41680df41 [PM 26691] [Fix: Remove dollar amount from total section when redeeming free families for enterprise (#16887)
* Resolve the dollar amount issue

* Resolve the non addition of storage amount

* Resolve the estimate tax amount

* Fix the improper tax calculation

* resolv ethe duplicate code

* Added changes to apply the discount only for acceptingSponsorship = true
2025-10-30 11:35:34 +01:00
Jared Snider
a1570fc8b1 feat(AuthRouteConstants): [Auth/PM-27370] Convert auth routes to use constants (#16980)
* PM-22663 WIP on auth route constants

* PM-22663 - Convert desktop & extension to use constants - first pass

* PM-22663 - Further clean up

* PM-22663 - catch more missed routes

* PM-22663 - add barrel files

* PM-22663 - Per PR feedback, add missing as const

* PM-22663 - Per PR feedback and TS docs, use same name for const enum like and derived type. Adjusted filenames to be singular.

* PM-22663 - Per PR feedback update desktop app routing module since auto rename didn't update it for whatever reason.
2025-10-29 19:28:21 -04:00
Shane Melton
51a557514f [PM-20379] Fix At-risk password task permission bug (#17110)
* [PM-20379] Fix at risk password task permission checks

* [PM-20379] Fix at risk password component specs

* [PM-20379] Cleanup FIXMEs

* [PM-20379] Update to OnPush

* [PM-20379] Add tests for pendingTasks$

* [PM-20379] Reduce test boilerplate / redundancy

* [PM-20379] Cleanup as any

* [PM-20379] Remove redundant "should" language
2025-10-29 14:47:55 -07:00
Jordan Aasen
b8921cb079 fix lint error (#17115) 2025-10-29 20:28:36 +00:00
Jordan Aasen
c05ea23ce4 [PM-25083][26650][26651][26652] - Autofill confirmation dialog (#16835)
* add autofill confirmation dialog

* fix key

* better handle bad uris

* add specs

* adjustments to autofill confirmation to include exact match dialog. fix gradient

* update logic. add tests
2025-10-29 12:55:23 -07:00
Brandon Treston
75846e8fb1 add decryption logic (#17106) 2025-10-29 15:04:37 -04:00
Oscar Hinton
d85b9986d0 [CL-901] [CL-903] Unowned - Prefer signal & change detection (#16949) 2025-10-29 13:42:19 -05:00
Vijay Oommen
687f3d144c [PM-17577] Inactive two-step login report - check hostname and domain name (#16823) 2025-10-29 10:58:38 -05:00
cyprain-okeke
d567530e15 resolve the button name (#17094) 2025-10-29 16:02:59 +01:00
Bernd Schoolmann
b1738cc6b2 [PM-26340] Add linux biometrics v2 (#16660)
* Extract windows biometrics v2 changes

Co-authored-by: Bernd Schoolmann <mail@quexten.com>

* Address some code review feedback

* cargo fmt

* rely on zeroizing allocator

* Handle TDE edge cases

* Update windows default

* Make windows rust code async and fix restoring focus freezes

* fix formatting

* cleanup native logging

* Add unit test coverage

* Add missing logic to edge case for PIN disable.

* Address code review feedback

* fix test

* code review changes

* fix clippy warning

* Swap to unimplemented on each method

* Implement encrypted memory store

* Make dpapi secure key container pub(super)

* Add linux biometrics v2

* Run cargo fmt

* Fix cargo lock

* Undo AC changes

* Undo change

* Fix build

* Cargo fmt

---------

Co-authored-by: Thomas Avery <tavery@bitwarden.com>
Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
2025-10-29 15:51:50 +01:00
Daniel Riera
d31b921169 PM-27364 delete bar.scss and drop bar.html internals (#17023)
* PM-27364 delete bar.scss and drop bar.html internals

* no longer clear document
2025-10-29 14:40:27 +00:00
SmithThe4th
4d00d0caa5 Fixed edit menu on admin console and removed favorite item on the admin console (#16982) 2025-10-29 10:31:21 -04:00
Alex Morask
460d66d624 Remove FF: pm-17772-admin-initiated-sponsorships (#16873)
* Remove FF

* Fix test
2025-10-29 07:41:35 -05:00
Maciej Zieniuk
ff30df3dd6 [PM-19300] Session timeout policy (#16583)
* Session timeout policy

* default "custom" is 8 hours, validation fixes

* ownership update

* default max allowed timeout is not selected

* adjusting defaults, fixing backwards compatibility, skip type confirmation dialog when switching between the never and on system lock

* unit test coverage

* wording update, custom hours, minutes jumping on errors

* wording update

* wrong session timeout action dropdown label

* show dialog as valid when opened first time, use @for loop, use controls instead of get

* dialog static opener

* easier to understand type value listener

* unit tests

* explicit maximum allowed timeout required error

* eslint revert
2025-10-28 20:28:34 +01:00
Daniel Riera
fe26826369 PM-27366 drop scss and convert to vanilla css (#17046) 2025-10-28 18:47:49 +00:00
Mick Letofsky
11d3f5247c Refactor canClone method to use CipherAuthorizationService (#16849) 2025-10-28 19:00:56 +01:00
Brandon Treston
c1a988c2ab fix DI (#17076) 2025-10-28 12:25:56 -04:00