Skip to content

Commit 02d5ca8

Browse files
authored
[PM-22852] Fix master password unlock subsequent attempts (#1686)
1 parent f47730e commit 02d5ca8

File tree

8 files changed

+44
-14
lines changed

8 files changed

+44
-14
lines changed

AuthenticatorShared/Core/Vault/Services/TestHelpers/BitwardenSdk+VaultMocking.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,12 @@ extension CipherListView {
7373
permissions: cipher.permissions,
7474
viewPassword: cipher.viewPassword,
7575
attachments: UInt32(cipher.attachments?.count ?? 0),
76+
hasOldAttachments: false,
7677
creationDate: cipher.creationDate,
7778
deletedDate: cipher.deletedDate,
78-
revisionDate: cipher.revisionDate
79+
revisionDate: cipher.revisionDate,
80+
copyableFields: [],
81+
localData: cipher.localData.map(LocalDataView.init)
7982
)
8083
}
8184
}

Bitwarden.xcworkspace/xcshareddata/swiftpm/Package.resolved

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

BitwardenShared/Core/Vault/Models/Domain/Fixtures/CipherListView+Fixtures.swift

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,12 @@ extension CipherListView {
1818
permissions: BitwardenSdk.CipherPermissions? = nil,
1919
viewPassword: Bool = true,
2020
attachments: UInt32 = 0,
21+
hasOldAttachments: Bool = false,
2122
creationDate: Date = Date(),
2223
deletedDate: Date? = nil,
23-
revisionDate: Date = Date()
24+
revisionDate: Date = Date(),
25+
copyableFields: [CopyableCipherFields] = [],
26+
localData: LocalDataView? = nil
2427
) -> CipherListView {
2528
.init(
2629
id: id,
@@ -38,9 +41,12 @@ extension CipherListView {
3841
permissions: permissions,
3942
viewPassword: viewPassword,
4043
attachments: attachments,
44+
hasOldAttachments: hasOldAttachments,
4145
creationDate: creationDate,
4246
deletedDate: deletedDate,
43-
revisionDate: revisionDate
47+
revisionDate: revisionDate,
48+
copyableFields: copyableFields,
49+
localData: localData
4450
)
4551
}
4652

@@ -60,9 +66,12 @@ extension CipherListView {
6066
permissions: BitwardenSdk.CipherPermissions? = nil,
6167
viewPassword: Bool = true,
6268
attachments: UInt32 = 0,
69+
hasOldAttachments: Bool = false,
6370
creationDate: Date = Date(),
6471
deletedDate: Date? = nil,
65-
revisionDate: Date = Date()
72+
revisionDate: Date = Date(),
73+
copyableFields: [CopyableCipherFields] = [],
74+
localData: LocalDataView? = nil
6675
) -> CipherListView {
6776
.init(
6877
id: id,
@@ -80,9 +89,12 @@ extension CipherListView {
8089
permissions: permissions,
8190
viewPassword: viewPassword,
8291
attachments: attachments,
92+
hasOldAttachments: hasOldAttachments,
8393
creationDate: creationDate,
8494
deletedDate: deletedDate,
85-
revisionDate: revisionDate
95+
revisionDate: revisionDate,
96+
copyableFields: copyableFields,
97+
localData: localData
8698
)
8799
}
88100
}

BitwardenShared/Core/Vault/Services/TestHelpers/BitwardenSdk+VaultMocking.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,12 @@ extension CipherListView {
7373
permissions: cipher.permissions,
7474
viewPassword: cipher.viewPassword,
7575
attachments: UInt32(cipher.attachments?.count ?? 0),
76+
hasOldAttachments: false,
7677
creationDate: cipher.creationDate,
7778
deletedDate: cipher.deletedDate,
78-
revisionDate: cipher.revisionDate
79+
revisionDate: cipher.revisionDate,
80+
copyableFields: [],
81+
localData: cipher.localData.map(LocalDataView.init)
7982
)
8083
}
8184
}

BitwardenShared/UI/Vault/PreviewContent/BitwardenSdk+VaultFixtures.swift

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,12 @@ extension CipherListView {
102102
permissions: CipherPermissions? = nil,
103103
viewPassword: Bool = false,
104104
attachments: UInt32 = 0,
105+
hasOldAttachments: Bool = false,
105106
creationDate: DateTime = Date(year: 2023, month: 11, day: 5, hour: 9, minute: 41),
106107
deletedDate: DateTime? = nil,
107-
revisionDate: DateTime = Date(year: 2023, month: 11, day: 5, hour: 9, minute: 41)
108+
revisionDate: DateTime = Date(year: 2023, month: 11, day: 5, hour: 9, minute: 41),
109+
copyableFields: [CopyableCipherFields] = [],
110+
localData: LocalDataView? = nil
108111
) -> CipherListView {
109112
.init(
110113
id: id,
@@ -122,9 +125,12 @@ extension CipherListView {
122125
permissions: permissions,
123126
viewPassword: viewPassword,
124127
attachments: attachments,
128+
hasOldAttachments: hasOldAttachments,
125129
creationDate: creationDate,
126130
deletedDate: deletedDate,
127-
revisionDate: revisionDate
131+
revisionDate: revisionDate,
132+
copyableFields: copyableFields,
133+
localData: localData
128134
)
129135
}
130136

@@ -144,9 +150,12 @@ extension CipherListView {
144150
permissions: CipherPermissions? = nil,
145151
viewPassword: Bool = false,
146152
attachments: UInt32 = 0,
153+
hasOldAttachments: Bool = false,
147154
creationDate: DateTime = Date(year: 2023, month: 11, day: 5, hour: 9, minute: 41),
148155
deletedDate: DateTime? = nil,
149-
revisionDate: DateTime = Date(year: 2023, month: 11, day: 5, hour: 9, minute: 41)
156+
revisionDate: DateTime = Date(year: 2023, month: 11, day: 5, hour: 9, minute: 41),
157+
copyableFields: [CopyableCipherFields] = [],
158+
localData: LocalDataView? = nil
150159
) -> CipherListView {
151160
.init(
152161
id: id,
@@ -164,9 +173,12 @@ extension CipherListView {
164173
permissions: permissions,
165174
viewPassword: viewPassword,
166175
attachments: attachments,
176+
hasOldAttachments: hasOldAttachments,
167177
creationDate: creationDate,
168178
deletedDate: deletedDate,
169-
revisionDate: revisionDate
179+
revisionDate: revisionDate,
180+
copyableFields: copyableFields,
181+
localData: localData
170182
)
171183
}
172184
}

project-bwa.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ include:
2323
packages:
2424
BitwardenSdk:
2525
url: https://github.com/bitwarden/sdk-swift
26-
revision: a9a790f3c0e3631bc625fae3fc28a14d26d7727a
26+
revision: 80dd7b284e5cdd09e065675b04f991a8ff7338fe
2727
branch: unstable
2828
Firebase:
2929
url: https://github.com/firebase/firebase-ios-sdk

project-bwk.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ include:
2323
packages:
2424
BitwardenSdk:
2525
url: https://github.com/bitwarden/sdk-swift
26-
revision: a9a790f3c0e3631bc625fae3fc28a14d26d7727a
26+
revision: 80dd7b284e5cdd09e065675b04f991a8ff7338fe
2727
branch: unstable
2828
Firebase:
2929
url: https://github.com/firebase/firebase-ios-sdk

project-pm.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ include:
2424
packages:
2525
BitwardenSdk:
2626
url: https://github.com/bitwarden/sdk-swift
27-
revision: a9a790f3c0e3631bc625fae3fc28a14d26d7727a
27+
revision: 80dd7b284e5cdd09e065675b04f991a8ff7338fe
2828
branch: unstable
2929
Firebase:
3030
url: https://github.com/firebase/firebase-ios-sdk

0 commit comments

Comments
 (0)