Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
1c1738c
SDK Update - ed5380c (3.0.0-7748-953508f)
bw-ghapp[bot] Aug 21, 2026
85abd86
SDK Update - a3fda30 (3.0.0-7749-b57d1bb)
bw-ghapp[bot] Aug 22, 2026
06f6312
[PM-40814] fix: Send contained key ID in the change KDF unlock data
bw-ghapp[bot] Aug 22, 2026
d94b199
SDK Update - 9d646cf (3.0.0-7757-f856c93)
bw-ghapp[bot] Aug 24, 2026
dac4efe
SDK Update - acee733 (3.0.0-7758-49b5213)
bw-ghapp[bot] Aug 24, 2026
b5311b2
SDK Update - 59a5e28 (3.0.0-7763-e5ec7c5)
bw-ghapp[bot] Aug 25, 2026
a5612f3
SDK Update - b89e765 (3.0.0-7776-268fa76)
bw-ghapp[bot] Aug 25, 2026
5bcd589
SDK Update - 8010eeb (3.0.0-7784-2ee904c)
bw-ghapp[bot] Aug 26, 2026
34ce02a
SDK Update - c158ba1 (3.0.0-7785-de0ac22)
bw-ghapp[bot] Aug 26, 2026
efff079
SDK Update - 8423bca (3.0.0-7802-6c40e04)
bw-ghapp[bot] Aug 26, 2026
b3a1c19
SDK Update - bb998da (3.0.0-7803-e3b223d)
bw-ghapp[bot] Aug 26, 2026
30dc11f
fix: Pass nil for the new Send and SendView data field
bw-ghapp[bot] Aug 26, 2026
fcf3466
SDK Update - 8eafde8 (3.0.0-7806-c1b859a)
bw-ghapp[bot] Aug 26, 2026
e5def04
SDK Update - e9f50ba (3.0.0-7826-c550467)
bw-ghapp[bot] Aug 27, 2026
02f78d5
SDK Update - 97ff5c6 (3.0.0-7827-b41ba80)
bw-ghapp[bot] Aug 27, 2026
462cb9b
SDK Update - 26f3e11 (3.0.0-7833-b19177e)
bw-ghapp[bot] Aug 27, 2026
b9ff106
SDK Update - 5aec8bc (3.0.0-7835-9daf108)
bw-ghapp[bot] Aug 27, 2026
72b5be6
SDK Update - fd64458 (3.0.0-7851-db45e84)
bw-ghapp[bot] Aug 28, 2026
969c4b4
SDK Update - ab1d63f (3.0.0-7852-b904fe4)
bw-ghapp[bot] Aug 28, 2026
2afd056
SDK Update - e20428d (3.0.0-7871-2204cba)
bw-ghapp[bot] Aug 31, 2026
2868504
SDK Update - 7022ec7 (3.0.0-7875-58a8c61)
bw-ghapp[bot] Aug 31, 2026
adf288c
SDK Update - 927d9b9 (3.0.0-7878-12e6fe3)
bw-ghapp[bot] Aug 31, 2026
b4312c5
SDK Update - 5f2412c (3.0.0-7882-cc0c362)
bw-ghapp[bot] Aug 31, 2026
171aba4
SDK Update - 7a99782 (3.0.0-7888-61a35d8)
bw-ghapp[bot] Aug 31, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,8 @@ public extension SendView {
type: send.type,
file: send.file.map(SendFileView.init),
text: send.text.map(SendTextView.init),
// The app doesn't support v2 send items yet, so there's nothing to round-trip here.
data: nil,
maxAccessCount: send.maxAccessCount,
accessCount: send.accessCount,
disabled: send.disabled,
Expand Down Expand Up @@ -522,6 +524,8 @@ public extension Send {
type: sendView.type,
file: sendView.file.map(SendFile.init),
text: sendView.text.map(SendText.init),
// The app doesn't support v2 send items yet, so there's nothing to round-trip here.
data: nil,
maxAccessCount: sendView.maxAccessCount,
accessCount: sendView.accessCount,
disabled: sendView.disabled,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ import BitwardenSdk
struct MasterPasswordUnlockDataRequestModel: Encodable, Equatable {
// MARK: Properties

/// The ID of the key contained in `masterKeyWrappedUserKey`, when the user's key has one.
let containedKeyId: String?

/// The KDF settings.
let kdf: KdfConfig

Expand All @@ -25,6 +28,7 @@ extension MasterPasswordUnlockDataRequestModel {
///
init(unlockData: MasterPasswordUnlockData) {
self.init(
containedKeyId: unlockData.containedKeyId,
kdf: KdfConfig(kdf: unlockData.kdf),
masterKeyWrappedUserKey: unlockData.masterKeyWrappedUserKey,
salt: unlockData.salt,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class UpdateKdfRequestModelTests: BitwardenTestCase {
kdf: .argon2id(iterations: 3, memory: 64, parallelism: 4),
masterKeyWrappedUserKey: "MASTER_KEY_WRAPPED_USER_KEY",
salt: "UNLOCK_SALT",
containedKeyId: "CONTAINED_KEY_ID",
),
oldMasterPasswordAuthenticationData: MasterPasswordAuthenticationData(
kdf: .pbkdf2(iterations: 100_000),
Expand All @@ -39,6 +40,7 @@ class UpdateKdfRequestModelTests: BitwardenTestCase {
masterPasswordHash: "OLD_MASTER_PASSWORD_AUTHENTICATION_HASH",
newMasterPasswordHash: "MASTER_PASSWORD_AUTHENTICATION_HASH",
unlockData: MasterPasswordUnlockDataRequestModel(
containedKeyId: "CONTAINED_KEY_ID",
kdf: KdfConfig(kdfType: .argon2id, iterations: 3, memory: 64, parallelism: 4),
masterKeyWrappedUserKey: "MASTER_KEY_WRAPPED_USER_KEY",
salt: "UNLOCK_SALT",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,7 @@ class AccountAPIServiceTests: BitwardenTestCase { // swiftlint:disable:this type
masterPasswordHash: "MASTER_PASSWORD_HASH",
newMasterPasswordHash: "NEW_MASTER_PASSWORD_HINT",
unlockData: MasterPasswordUnlockDataRequestModel(
containedKeyId: nil,
kdf: KdfConfig(),
masterKeyWrappedUserKey: "MASTER_KEY_WRAPPED_USER_KEY",
salt: "UNLOCK_SALT",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,7 @@ class UpdateKdfRequestTests: BitwardenTestCase {
override func setUp() {
super.setUp()

subject = UpdateKdfRequest(
requestModel: UpdateKdfRequestModel(
authenticationData: MasterPasswordAuthenticationDataRequestModel(
kdf: KdfConfig(
kdfType: .argon2id,
iterations: 3,
memory: 64,
parallelism: 4,
),
masterPasswordAuthenticationHash: "MASTER_PASSWORD_AUTHENTICATION_HASH",
salt: "AUTHENTICATION_SALT",
),
key: "key",
masterPasswordHash: "MASTER_PASSWORD_HASH",
newMasterPasswordHash: "NEW_MASTER_PASSWORD_HINT",
unlockData: MasterPasswordUnlockDataRequestModel(
kdf: KdfConfig(),
masterKeyWrappedUserKey: "MASTER_KEY_WRAPPED_USER_KEY",
salt: "UNLOCK_SALT",
),
),
)
subject = makeSubject()
}

override func tearDown() {
Expand Down Expand Up @@ -77,6 +56,41 @@ class UpdateKdfRequestTests: BitwardenTestCase {
)
}

/// `body` includes the contained key ID in the unlock data when the user's key has one.
func test_body_containedKeyId() throws {
subject = makeSubject(containedKeyId: "CONTAINED_KEY_ID")
let bodyData = try XCTUnwrap(subject.body?.encode())
XCTAssertEqual(
bodyData.prettyPrintedJson,
"""
{
"authenticationData" : {
"kdf" : {
"iterations" : 3,
"kdfType" : 1,
"memory" : 64,
"parallelism" : 4
},
"masterPasswordAuthenticationHash" : "MASTER_PASSWORD_AUTHENTICATION_HASH",
"salt" : "AUTHENTICATION_SALT"
},
"key" : "key",
"masterPasswordHash" : "MASTER_PASSWORD_HASH",
"newMasterPasswordHash" : "NEW_MASTER_PASSWORD_HINT",
"unlockData" : {
"containedKeyId" : "CONTAINED_KEY_ID",
"kdf" : {
"iterations" : 600000,
"kdfType" : 0
},
"masterKeyWrappedUserKey" : "MASTER_KEY_WRAPPED_USER_KEY",
"salt" : "UNLOCK_SALT"
}
}
""",
)
}

/// `method` is `.post`.
func test_method() {
XCTAssertEqual(subject.method, .post)
Expand All @@ -86,4 +100,36 @@ class UpdateKdfRequestTests: BitwardenTestCase {
func test_path() {
XCTAssertEqual(subject.path, "/accounts/kdf")
}

// MARK: Private

/// Returns an `UpdateKdfRequest` for testing.
///
/// - Parameter containedKeyId: The ID of the key contained in the wrapped user key.
///
private func makeSubject(containedKeyId: String? = nil) -> UpdateKdfRequest {
UpdateKdfRequest(
requestModel: UpdateKdfRequestModel(
authenticationData: MasterPasswordAuthenticationDataRequestModel(
kdf: KdfConfig(
kdfType: .argon2id,
iterations: 3,
memory: 64,
parallelism: 4,
),
masterPasswordAuthenticationHash: "MASTER_PASSWORD_AUTHENTICATION_HASH",
salt: "AUTHENTICATION_SALT",
),
key: "key",
masterPasswordHash: "MASTER_PASSWORD_HASH",
newMasterPasswordHash: "NEW_MASTER_PASSWORD_HINT",
unlockData: MasterPasswordUnlockDataRequestModel(
containedKeyId: containedKeyId,
kdf: KdfConfig(),
masterKeyWrappedUserKey: "MASTER_KEY_WRAPPED_USER_KEY",
salt: "UNLOCK_SALT",
),
),
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ extension BitwardenSdk.Send {
type: type,
file: model.file.map(SendFile.init),
text: model.text.map(SendText.init),
// The API response model has no v2 send item payload, which the app doesn't support yet.
data: nil,
maxAccessCount: model.maxAccessCount,
accessCount: model.accessCount,
disabled: model.disabled,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ extension Send {
type: sdkType,
file: file.map(SendFile.init),
text: text.map(SendText.init),
data: nil,
maxAccessCount: maxAccessCount,
accessCount: accessCount,
disabled: disabled,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ extension SendView {
type: type,
file: file,
text: text,
data: nil,
maxAccessCount: maxAccessCount,
accessCount: accessCount,
disabled: disabled,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ extension SendListState {
type: .file,
file: nil,
text: nil,
data: nil,
maxAccessCount: nil,
accessCount: 0,
disabled: false,
Expand All @@ -68,6 +69,7 @@ extension SendListState {
type: .text,
file: nil,
text: nil,
data: nil,
maxAccessCount: nil,
accessCount: 0,
disabled: false,
Expand All @@ -91,6 +93,7 @@ extension SendListState {
type: .text,
file: nil,
text: nil,
data: nil,
maxAccessCount: 1,
accessCount: 1,
disabled: true,
Expand Down Expand Up @@ -128,6 +131,7 @@ extension SendListState {
type: .text,
file: nil,
text: nil,
data: nil,
maxAccessCount: nil,
accessCount: 0,
disabled: false,
Expand All @@ -151,6 +155,7 @@ extension SendListState {
type: .text,
file: nil,
text: nil,
data: nil,
maxAccessCount: nil,
accessCount: 0,
disabled: false,
Expand All @@ -174,6 +179,7 @@ extension SendListState {
type: .text,
file: nil,
text: nil,
data: nil,
maxAccessCount: 1,
accessCount: 1,
disabled: true,
Expand Down Expand Up @@ -210,6 +216,7 @@ extension SendListState {
type: .file,
file: nil,
text: nil,
data: nil,
maxAccessCount: nil,
accessCount: 0,
disabled: false,
Expand All @@ -233,6 +240,7 @@ extension SendListState {
type: .text,
file: nil,
text: nil,
data: nil,
maxAccessCount: nil,
accessCount: 0,
disabled: false,
Expand All @@ -256,6 +264,7 @@ extension SendListState {
type: .text,
file: nil,
text: nil,
data: nil,
maxAccessCount: 1,
accessCount: 1,
disabled: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,8 @@ extension AddEditSendItemState {
type: sdkType,
file: type == .file ? newFileView() : nil,
text: type == .text ? newTextView() : nil,
// The app only creates v1 sends, which carry no send item payload.
data: nil,
maxAccessCount: maximumAccessCount == 0 ? nil : UInt32(maximumAccessCount),
accessCount: 0, // Defaulting to `0`, since the API ignores the values we set here.
disabled: isDeactivateThisSendOn,
Expand Down
2 changes: 1 addition & 1 deletion project-common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ include:
packages:
BitwardenSdk:
url: https://github.com/bitwarden/sdk-swift
revision: b7e7be7e7f5adde3cafcb27d79fac80a53c5c3c8 # 3.0.0-7742-9794da5
revision: 7a99782e62595b47aab7818ed8727e7e69067fc4 # 3.0.0-7888-61a35d8
Firebase:
url: https://github.com/firebase/firebase-ios-sdk
exactVersion: 12.14.0
Expand Down
Loading