[PR #2893] [MERGED] [PM-4739] Implement checksum uri validation #110909

Closed
opened 2026-06-06 07:14:38 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/2893
Author: @LRNcardozoWDF
Created: 12/7/2023
Status: Merged
Merged: 1/24/2024
Merged by: @LRNcardozoWDF

Base: mainHead: vault/pm-4739-implement-checksum-uri


📝 Commits (10+)

  • b2374ed PM-4739 Implement checksum uri validation
  • c2928b8 Merge branch 'master' into vault/pm-4739-implement-checksum-uri
  • e947d3e PM-4739 Add missing field
  • e1e9ee0 Merge branch 'master' into vault/pm-4739-implement-checksum-uri
  • c04933b Merge branch 'master' into vault/pm-4739-implement-checksum-uri
  • 287b3a0 PM-4739 Fix PR comments
  • edc1e55 Merge branch 'master' into vault/pm-4739-implement-checksum-uri
  • 0eea178 PM-4739 Remove unnecessary comment
  • 0e40102 PM-4739 Add try catch and log exception
  • 573cdf9 Merge branch 'master' into vault/pm-4739-implement-checksum-uri

📊 Changes

13 files changed (+60 additions, -11 deletions)

View changed files

📝 src/Android/MainApplication.cs (+1 -1)
📝 src/Core/Abstractions/ICryptoService.cs (+2 -0)
📝 src/Core/Constants.cs (+1 -1)
📝 src/Core/Models/Api/LoginUriApi.cs (+1 -0)
📝 src/Core/Models/Data/LoginUriData.cs (+2 -0)
📝 src/Core/Models/Domain/Cipher.cs (+1 -1)
📝 src/Core/Models/Domain/Login.cs (+9 -2)
📝 src/Core/Models/Domain/LoginUri.cs (+5 -2)
📝 src/Core/Models/Export/LoginUri.cs (+2 -0)
📝 src/Core/Models/Request/CipherRequest.cs (+1 -1)
📝 src/Core/Services/CipherService.cs (+3 -1)
📝 src/Core/Services/CryptoService.cs (+31 -1)
📝 src/iOS.Core/Utilities/iOSCoreHelpers.cs (+1 -1)

📄 Description

Type of change

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

Objective

This change ensures that the encrypted string is the same as what was originally saved with the server through the use of a checksum.

Code changes

Related to:
https://github.com/bitwarden/clients/pull/6485
https://github.com/bitwarden/server/pull/3318

  • LoginUriApi.cs/LoginUriData.cs: Adds checksum to loginUri models for the api.
  • Cipher.cs: Bypass validation if Cipher doesn't have a key
  • Login.cs: Changed logic to only add valid uris
  • LoginUri.cs: Add a method to validate the uri
  • CipherService.cs: Add a checksum to domain LoginUri that will be used later for validation
  • CryptoService.cs: Add a method that returns a base64 hash.

Before you submit

  • Please check for formatting errors (dotnet format --verify-no-changes) (required)
  • 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

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/bitwarden/android/pull/2893 **Author:** [@LRNcardozoWDF](https://github.com/LRNcardozoWDF) **Created:** 12/7/2023 **Status:** ✅ Merged **Merged:** 1/24/2024 **Merged by:** [@LRNcardozoWDF](https://github.com/LRNcardozoWDF) **Base:** `main` ← **Head:** `vault/pm-4739-implement-checksum-uri` --- ### 📝 Commits (10+) - [`b2374ed`](https://github.com/bitwarden/android/commit/b2374ed5f65a29429f9f09370e12fd49c2ddf4aa) PM-4739 Implement checksum uri validation - [`c2928b8`](https://github.com/bitwarden/android/commit/c2928b88b024b422f1079e7a6b81523a4dce76f1) Merge branch 'master' into vault/pm-4739-implement-checksum-uri - [`e947d3e`](https://github.com/bitwarden/android/commit/e947d3eebbc6ff75c9409c24203857f61a6cbe87) PM-4739 Add missing field - [`e1e9ee0`](https://github.com/bitwarden/android/commit/e1e9ee0255596dffb09f77e8f92a74e1103f171f) Merge branch 'master' into vault/pm-4739-implement-checksum-uri - [`c04933b`](https://github.com/bitwarden/android/commit/c04933b95982b924396cebf7d84ad66d98f24902) Merge branch 'master' into vault/pm-4739-implement-checksum-uri - [`287b3a0`](https://github.com/bitwarden/android/commit/287b3a0580cdccd1b63d2f1108e734de2f42fc8a) PM-4739 Fix PR comments - [`edc1e55`](https://github.com/bitwarden/android/commit/edc1e555b645a8d797a12b6ed18e1e2d7179bf3e) Merge branch 'master' into vault/pm-4739-implement-checksum-uri - [`0eea178`](https://github.com/bitwarden/android/commit/0eea17831bf1af3db3c1f21eea808fc9c09942f9) PM-4739 Remove unnecessary comment - [`0e40102`](https://github.com/bitwarden/android/commit/0e40102de536f64211b5f20187f597ba486954aa) PM-4739 Add try catch and log exception - [`573cdf9`](https://github.com/bitwarden/android/commit/573cdf9984169e0c84b90022cad3d877604382f4) Merge branch 'master' into vault/pm-4739-implement-checksum-uri ### 📊 Changes **13 files changed** (+60 additions, -11 deletions) <details> <summary>View changed files</summary> 📝 `src/Android/MainApplication.cs` (+1 -1) 📝 `src/Core/Abstractions/ICryptoService.cs` (+2 -0) 📝 `src/Core/Constants.cs` (+1 -1) 📝 `src/Core/Models/Api/LoginUriApi.cs` (+1 -0) 📝 `src/Core/Models/Data/LoginUriData.cs` (+2 -0) 📝 `src/Core/Models/Domain/Cipher.cs` (+1 -1) 📝 `src/Core/Models/Domain/Login.cs` (+9 -2) 📝 `src/Core/Models/Domain/LoginUri.cs` (+5 -2) 📝 `src/Core/Models/Export/LoginUri.cs` (+2 -0) 📝 `src/Core/Models/Request/CipherRequest.cs` (+1 -1) 📝 `src/Core/Services/CipherService.cs` (+3 -1) 📝 `src/Core/Services/CryptoService.cs` (+31 -1) 📝 `src/iOS.Core/Utilities/iOSCoreHelpers.cs` (+1 -1) </details> ### 📄 Description ## Type of change - [X] Bug fix - [X] New feature development - [ ] Tech debt (refactoring, code cleanup, dependency upgrades, etc) - [ ] Build/deploy pipeline (DevOps) - [ ] Other ## Objective <!--Describe what the purpose of this PR is. For example: what bug you're fixing or what new feature you're adding--> This change ensures that the encrypted string is the same as what was originally saved with the server through the use of a checksum. ## Code changes <!--Explain the changes you've made to each file or major component. This should help the reviewer understand your changes--> <!--Also refer to any related changes or PRs in other repositories--> Related to: https://github.com/bitwarden/clients/pull/6485 https://github.com/bitwarden/server/pull/3318 * **LoginUriApi.cs/LoginUriData.cs:** Adds checksum to loginUri models for the api. * **Cipher.cs:** Bypass validation if Cipher doesn't have a key * **Login.cs:** Changed logic to only add valid uris * **LoginUri.cs:** Add a method to validate the uri * **CipherService.cs:** Add a checksum to domain LoginUri that will be used later for validation * **CryptoService.cs:** Add a method that returns a base64 hash. ## Before you submit - Please check for formatting errors (`dotnet format --verify-no-changes`) (required) - 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 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-06-06 07:14:38 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/android#110909