Skip to content
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

[PM-3084] fix: Fix null handling in SendLicenseExpiredAsync method #3122

Merged
merged 3 commits into from
Aug 27, 2024
Merged

Conversation

GSWXXN
Copy link
Contributor

@GSWXXN GSWXXN commented Jul 19, 2023

Type of change

- [x] Bug fix
- [ ] New feature development
- [ ] Tech debt (refactoring, code cleanup, dependency upgrades, etc)
- [ ] Build/deploy pipeline (DevOps)
- [ ] Other

Objective

Fixed that when the user license is not available, there may be an error when logging in to Bitwarden, and the user may not receive the license expiration reminder email

Code changes

  • HandlebarsMailService.cs: A null check has been added to prevent an exception when passing an empty organizationName to the CoreHelpers.SanitizeForEmail() method. Without this change, the specific location in the code (at this link) would throw an exception.

Before you submit

  • Please check for formatting errors (dotnet format --verify-no-changes) (required)
  • If making database changes - make sure you also update Entity Framework queries and/or migrations
  • Please add unit tests where it makes sense to do so (encouraged but not required)
  • If this change requires a documentation update - notify the documentation team
  • If this change has particular deployment requirements - notify the DevOps team

@bitwarden-bot
Copy link

Thank you for your contribution! We've added this to our internal Community PR board for review.
ID: PM-3084

@bitwarden-bot bitwarden-bot changed the title fix: Fix null handling in SendLicenseExpiredAsync method [PM-3084] fix: Fix null handling in SendLicenseExpiredAsync method Jul 19, 2023
@bitwarden-bot
Copy link

bitwarden-bot commented Jul 19, 2023

Logo
Checkmarx One – Scan Summary & Details16678278-5020-41d3-a366-6937533db8d4

Fixed Issues

Severity Issue Source File / Package
HIGH Passwords And Secrets - Generic Password /test-database.yml: 173
HIGH Passwords And Secrets - Generic Password /test-database.yml: 111
HIGH Passwords And Secrets - Generic Password /test-database.yml: 80
HIGH Passwords And Secrets - Generic Password /test-database.yml: 69
HIGH Passwords And Secrets - Generic Password /test-database.yml: 105
HIGH Passwords And Secrets - Generic Password /test-database.yml: 92
HIGH Passwords And Secrets - Generic Password /test-database.yml: 170
HIGH Passwords And Secrets - Generic Password /test-database.yml: 177
MEDIUM CSRF /src/Api/AdminConsole/Controllers/OrganizationsController.cs: 504
MEDIUM CSRF /src/Api/AdminConsole/Controllers/OrganizationsController.cs: 471
MEDIUM CSRF /src/Api/AdminConsole/Controllers/OrganizationsController.cs: 529
MEDIUM CSRF /src/Api/AdminConsole/Controllers/OrganizationUsersController.cs: 561
MEDIUM CSRF /src/Api/AdminConsole/Controllers/OrganizationsController.cs: 177
MEDIUM CSRF /src/Api/Billing/Public/Controllers/OrganizationController.cs: 47
MEDIUM CSRF /src/Api/AdminConsole/Controllers/OrganizationUsersController.cs: 279
MEDIUM CSRF /src/Api/AdminConsole/Controllers/OrganizationsController.cs: 504
MEDIUM CSRF /src/Api/AdminConsole/Controllers/OrganizationUsersController.cs: 547
MEDIUM Unpinned Actions Full Length Commit SHA /build.yml: 598
MEDIUM Unpinned Actions Full Length Commit SHA /build.yml: 548
MEDIUM Unpinned Actions Full Length Commit SHA /build.yml: 515
LOW Log_Forging /src/Api/Auth/Controllers/EmergencyAccessController.cs: 159

@GSWXXN GSWXXN marked this pull request as draft July 20, 2023 20:01
@GSWXXN GSWXXN marked this pull request as ready for review July 20, 2023 20:02
Copy link

@nsbgit nsbgit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@GSWXXN GSWXXN requested a review from nsbgit August 14, 2024 09:51
@djsmith85 djsmith85 requested review from a team and removed request for nsbgit August 14, 2024 10:19
@amorask-bitwarden
Copy link
Contributor

@GSWXXN Appreciate the contribution! I've reviewed this and since it's just a null-check addition, I'm going to push it through. You can expect this change to be in the release on 9/17.

Thanks again!

@amorask-bitwarden amorask-bitwarden merged commit 46955d4 into bitwarden:main Aug 27, 2024
31 of 47 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants