1
0
mirror of https://github.com/bitwarden/server synced 2026-01-30 16:23:37 +00:00
Commit Graph

6676 Commits

Author SHA1 Message Date
Sven
82b9df0078 Fix formatting 2026-01-26 15:39:47 -06:00
Sven
4bb5a2d686 Fix incorrect mock on test 2026-01-26 15:39:47 -06:00
Sven
2aab4bd583 Format code 2026-01-26 15:39:47 -06:00
Sven
8cff2e4aa8 Adjust codebase to use new PolicyQueryçˆ 2026-01-26 15:39:44 -06:00
Sven
4ddef79334 Adds test cases covering query 2026-01-26 15:38:08 -06:00
Sven
80c02a79ec Fix broken test, delete inapplicable test 2026-01-26 15:38:08 -06:00
Sven
982ff747eb Prune extranneous data from policy detail response model, format code 2026-01-26 15:38:08 -06:00
sven-bitwarden
665e2a7e53 Updates usages to reflect new shim model 2026-01-26 15:38:08 -06:00
sven-bitwarden
8dd13a3697 Add xml doc, incorporate shim data model 2026-01-26 15:38:08 -06:00
sven-bitwarden
75c843d817 Initial refactor of policy loading 2026-01-26 15:38:08 -06:00
sven-bitwarden
d5f207c9ac Correct namespace 2026-01-26 15:38:08 -06:00
sven-bitwarden
9b8cf29734 Adjusts method name to better match repository method 2026-01-26 15:38:08 -06:00
sven-bitwarden
529f578c5b Remove unused using 2026-01-26 15:38:08 -06:00
sven
e76620838e Initial implementation of new policy query 2026-01-26 15:38:08 -06:00
renovate[bot]
2a458807a5 [deps] Vault: Update AngleSharp to 1.4.0 (#5868)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Nick Krantz <125900171+nick-livefront@users.noreply.github.com>
2026-01-26 12:04:23 -06:00
Alex Morask
5104ec5f98 [PM-31040] Add logging to bank account setup process (#6898)
* Add logging to bank account setup process

* Missed test file constructor
2026-01-26 11:46:08 -06:00
Github Actions
afb087161a Bumped version to 2026.1.1 2026-01-26 15:59:06 +00:00
Oscar Hinton
46a4c09b81 Add desktop-migration-milestone-4 flag (#6881) 2026-01-26 16:36:10 +01:00
Anders Åberg
40e293117d PM-2035: PRF Unlock (#6401)
* Initial refactor

* Add WebauthnPRFOptions to syncResponse

* MAYBE: Use KM owned ResponseModel?

* REVERT ^- Keep using PrfUnlockOptions for simplicity

This reverts commit 5a34e7dfa8.

* UserDecryptionOptions: Only send one credential

* format

* Update UserDecryptionOptions.cs

* format

* Added feature flag (#6600)
2026-01-26 07:18:42 -08:00
Rui Tomé
c8124667ee [PM-28842] Add validation to prevent excessive master password policy values (#6807)
* Enhance MasterPasswordPolicyData with validation attributes

Added data annotations for MinComplexity and MinLength properties to enforce validation rules. MinComplexity must be between 0 and 4, and MinLength must be between 12 and 128.

* Implement model validation in PolicyDataValidator and enhance error handling

Added a ValidateModel method to enforce validation rules for policy data. Updated error messages to provide clearer feedback on validation failures. Enhanced unit tests to cover new validation scenarios for MinLength and MinComplexity properties.

* Update PoliciesControllerTests to reflect new validation rules for MinComplexity and MinLength

Modified test cases to use updated values for MinComplexity (4) and MinLength (128). Added new tests to verify that excessive values for these properties return BadRequest responses. Ensured consistency across integration tests for both Admin and Public controllers.

* Enhance MasterPasswordPolicyData with XML documentation for properties

Added XML documentation comments for MinComplexity and MinLength properties to clarify their purpose and constraints. This improves code readability and provides better context for developers using the model.

* Add unit tests for PolicyDataValidator to validate minLength and minComplexity rules

Implemented new test cases to verify the behavior of the ValidateAndSerialize method in PolicyDataValidator. Tests cover scenarios for minimum and maximum values, as well as edge cases for invalid inputs, ensuring robust validation for MasterPassword policy data.
2026-01-26 11:38:06 +00:00
Conner Turnbull
d8379d3474 Updated devcontainer configs, fixed migration variable bug, added DEV_CERT_CONTENTS to .env.example (#6891) 2026-01-23 19:43:32 -05:00
Justin Baur
866ba6609d PM-31106: Dev container improvements (#6651)
* Add rust feature

* Give the community create command the non-interactive treatment

* Add ability to load custom root CA

* Update .devcontainer/community_dev/postCreateCommand.sh

Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>

* Update .devcontainer/community_dev/postCreateCommand.sh

Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>

---------

Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
2026-01-23 16:23:45 -05:00
Vijay Oommen
80d05eef07 PM-30879 added feature flag for huntress (#6883) 2026-01-23 13:36:27 -06:00
Todd Martin
8cf05d8c67 Group server minor and patch npm dependencies for Auth (#6865)
* Group minor and patch npm dependencies for Auth.

* Remove comment.
2026-01-23 12:08:04 -05:00
Vijay Oommen
b623e381b4 PM-30799 added validation for DomainName (#6856) 2026-01-23 08:34:19 -06:00
Robyn MacCallum
867e61694b Add NotificationUndeterminedCipherScenarioLogic feature flag (#6884)
* Add NotificationUndeterminedCipherScenarioLogic feature flag

* Remove whitespace
2026-01-23 09:05:58 -05:00
renovate[bot]
b360d6a00a [deps]: Update github-action minor (#6868)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Daniel James Smith <2670567+djsmith85@users.noreply.github.com>
2026-01-23 11:43:05 +00:00
Rui Tomé
bfe2e7717d [PM-30615] Fix Public API List Collections returning Default Collections (#6841) 2026-01-23 11:07:56 +00:00
Dave
93e2c971df feat(emergency-access) [PM-29584] Create Email for Emergency Access Removal (#6793)
* feat(emergency-access) [PM-29584]: Add email template.

* refactor(emergency-access) [PM-29584]: Move Emergency Access to Auth/UserFeatures.

* refactor(emergency-access) [PM-29584]: Move EmergencyAccess tests to UserFeatures space.

* feat(emergency-access) [PM-29584]: Add compiled EmergencyAccess templates.

* test(emergency-access) [PM-29584]: Add mailer-specific tests.

* refactor(emergency-access) [PM-29584]: Move mail to UserFeatures area.

* feat(emergency-access) [PM-29584]: Update link for help pages, not web vault.

* test(emergency-access) [PM-29584]: Update mail tests for new URL and single responsibility.

* refactor(emergency-access) [PM-29584]: Add comments for added test.
2026-01-22 20:24:15 -05:00
Mike Amirault
0cc72127d7 [PM-26405] Fix cipher favorite info being saved incorrectly on import (#6776) 2026-01-22 20:11:56 -05:00
Derek Nance
415821f173 [PM-29142] Config for SSO cookie vending (#6880)
This config may be used when a load balancer in front of Bitwarden is
first verifying an auth cookie issued by an IdP before proxying the
request to Bitwarden.
2026-01-22 15:20:38 -06:00
Vincent Salucci
bab4750caa chore: add feature flag definition, refs PM-26463 (#6882) 2026-01-22 17:23:18 +00:00
Alex Morask
b686da18dc [PM-30626] Fetch provided storage from Pricing Service when determining storage limit (#6845)
* Fetch provided storage from Pricing Service

* Run dotnet format

* Gbubemi's feedback
2026-01-22 09:01:06 -06:00
Alex Morask
75a857055e [PM-30697] [PM-30698] Renewal email copy updates (#6875)
* feat(families-renewal): Update copy

* feat(premium-renewal): Add new var, update copy
2026-01-21 11:52:36 -06:00
Rui Tomé
7fb2822e05 [PM-28023] Fix restoring revoked invited users in Free Organizations (#6861)
* Fix null reference when restoring invited users in Free orgs

Add null check before querying for other free org ownership. Invited
users don't have a UserId yet, causing NullReferenceException.

* Add regression test for restoring revoked invited users with null UserId.
2026-01-21 11:27:24 +00:00
Alex Morask
439485fc16 Update renewal email copy (#6862) 2026-01-20 09:29:49 -06:00
Alex Morask
2e4dd061e3 [PM-30855] Pay prorated storage adjustment immediately with Braintree for Premium PayPal users (#6850)
* fix: Pay prorated storage invoice immediately with Braintree for PayPal users

* Run dotnet format
2026-01-20 09:18:27 -06:00
Todd Martin
c37412bacb chore(flags): Remove pm-1632-redirect-on-sso-required feature flag
* Remove feature flag.

* Update test title.

* Fixed some test failures.

* Fixed tests

* Removed method that's no longer used.

* Removed unneeded directive.
2026-01-20 10:03:33 -05:00
Thomas Rittson
ad19efcff7 [PM-22236] Fix invited accounts stuck in intermediate claimed status (#6810)
* Exclude invited users from claimed domain checks.
  These users should be excluded by the JOIN on
  UserId, but it's a known issue that some invited
  users have this FK set.
2026-01-17 10:47:21 +10:00
Stephon Brown
8d30fbcc8a Billing/pm 30882/defect pm coupon removed on upgrade (#6863)
* fix(billing): update coupon check logic

* tests(billing): update tests and add plan check test
2026-01-16 18:13:57 -05:00
Justin Baur
aa33a67aee [PM-30858] Fix excessive logs (#6860)
* Add tests showing issue & workaround

- `AddSerilogFileLogging_LegacyConfig_InfoLogs_DoNotFillUpFile` fails
- `AddSerilogFileLogging_LegacyConfig_WithLevelCustomization_InfoLogs_DoNotFillUpFile` fails
- `AddSerilogFileLogging_NewConfig_InfoLogs_DoNotFillUpFile` fails
- `AddSerilogFileLogging_NewConfig_WithLevelCustomization_InfoLogs_DoNotFillUpFile` works

* Allow customization of LogLevel with legacy path format config

* Lower default logging levels

* Delete tests now that log levels have been customized
2026-01-16 10:33:17 -05:00
Thomas Rittson
ebb0712e33 [PM-28555] Add idempotent sproc to create My Items collections (#6801)
* Add sproc to create multiple default collections. 
  SqlBulkCopy implementation is overkill for most cases.
  This provides a lighter weight sproc implementation for smaller
  data sets.
* DRY up collection arrangement
* DRY up tests because bulk and non-bulk share same behavior
* use EF native AddRange instead of bulk insert, because
  we expect smaller data sizes on self-host
2026-01-15 22:49:25 +00:00
mkincaid-bw
51d90cce3d Add Entity Framework migration validation to verify_migrations script (#6817)
* Add Entity Framework migration validation to verify_migrations script

Enhances dev/verify_migrations.ps1 to validate EF migration files in addition to SQL migrations. The script now validates migrations in util/MySqlMigrations, util/PostgresMigrations, and util/SqliteMigrations directories.

Validation includes:
- Correct naming format (YYYYMMDDHHMMSS_Description.cs)
- Both .cs and .Designer.cs files exist as pairs
- Chronological ordering of timestamps
- Excludes DatabaseContextModelSnapshot.cs files

The script provides comprehensive reporting for all migration types with a summary showing which validations passed or failed.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* Fix: Validate all EF migration files instead of silently ignoring malformed names

Previously, migration files that didn't match the expected pattern were silently
ignored during validation. This could allow incorrectly named files to slip through.

Now the script explicitly tracks and reports any migration files that don't match
the required YYYYMMDDHHMMSS_Description.cs format, ensuring all new migration files
are properly validated.

Addresses feedback from PR review to prevent malformed migration files from being
overlooked.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-15 13:43:23 -08:00
Patrick-Pimentel-Bitwarden
029a5f6a2d Revert "feat(register): [PM-27084] Account Register Uses New Data Types (#6715)" (#6854)
This reverts commit 8cb8030534.
2026-01-15 21:19:16 +00:00
Patrick-Pimentel-Bitwarden
8cb8030534 feat(register): [PM-27084] Account Register Uses New Data Types (#6715)
* feat(register): [PM-27084] Account Register Uses New Data Types - Implementation

* test(register): [PM-27084] Account Register Uses New Data Types - Added tests
2026-01-15 15:55:27 -05:00
rr-bw
c7e364a39c chore(flag): add pm-27086-update-authentication-apis-for-input-password feature flag 2026-01-15 09:00:31 -05:00
cyprain-okeke
2e0e103076 Fix the currency culture invariant (#6812) 2026-01-15 09:55:43 +01:00
Justin Baur
44249c38e0 Add some integration tests for the Server project (#6839)
* Add some integration tests for the Server project

* Not sure why this project got removed?

* Format

* capture debug output

* Update tests to work with the now legacy WebHostBuilder

- I accidentally had the updated Program locally and that was why tests were working for me locally

* Formatting...again
2026-01-15 03:52:00 -05:00
Jordan Aasen
b86a31160a [PM-30448] - remove edit requirement for cipher archiving (#6830)
* remove edit requirement for cipher archiving

* update cipher_archive/unarchive sql

* update cipher_archive/unarchive sql

* fix sql

* update sql

* update sql
2026-01-14 15:55:09 -08:00
renovate[bot]
ed5419c767 [deps] Auth: Update Microsoft.Extensions.Caching.Cosmos to 1.8.0 (#6326)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ike <137194738+ike-kottlowski@users.noreply.github.com>
2026-01-14 18:17:20 -05:00