We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1d708c6 commit 395435eCopy full SHA for 395435e
1 file changed
src/vaultwarden/models/bitwarden.py
@@ -223,14 +223,14 @@ def set_key(
223
handler: ModelWrapValidatorHandler[Self],
224
info: ValidationInfo,
225
) -> Self:
226
- if data.get("key") is not None:
+ if (key := data.get("key")) is not None:
227
info.context["cctx"].append(
228
- decrypt(data["key"], info.context["cctx"][0])
+ decrypt(key, info.context["cctx"][0])
229
)
230
231
v = handler(data)
232
233
+ if key is not None:
234
info.context["cctx"].pop()
235
236
return v
@@ -796,7 +796,7 @@ def _get_ciphers(self) -> list[CipherDetails]:
796
context={
797
"parent_id": self.Id,
798
"client": self.api_client,
799
- "cctx": [org_key],
+ "cctx": [org_key], # crypto context
800
},
801
802
return res.Data
0 commit comments