Skip to content

[keyvault] Invalid comparison in azure.keyvault.keys.crypto._internal.jose #11151

@zooba

Description

@zooba

if not (self.protected, self.encrypted_key, self.iv, self.ciphertext, self.tag):
raise ValueError("JWE is not complete.")

In the above code, the if not (tuple-with-any-elements): check will always evaluate to True.

I believe in this case you want if not all((self.protected, ...)) to ensure that each specified element is not empty.

Metadata

Metadata

Assignees

Labels

ClientThis issue points to a problem in the data-plane of the library.KeyVaultbugThis issue requires a change to an existing behavior in the product in order to be resolved.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions