Skip to content

Commit ea346a8

Browse files
author
Kamran Khan
committed
Add IsNullOrEmpty check for SecretUrl
1 parent 54a0394 commit ea346a8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/ResourceManager/Compute/Commands.Compute/Extension/AzureDiskEncryption/GetAzureDiskEncryptionStatus.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,10 @@ private EncryptionStatus IsOsVolumeEncrypted(VirtualMachine vmParameters)
7272
case OSType.Windows:
7373
DiskEncryptionSettings osEncryptionSettings = GetOsVolumeEncryptionSettings(vmParameters);
7474

75-
if (osEncryptionSettings != null && osEncryptionSettings.DiskEncryptionKey != null && osEncryptionSettings.Enabled == true)
75+
if (osEncryptionSettings != null
76+
&& osEncryptionSettings.DiskEncryptionKey != null
77+
&& !String.IsNullOrEmpty(osEncryptionSettings.DiskEncryptionKey.SecretUrl)
78+
&& osEncryptionSettings.Enabled == true)
7679
{
7780
return EncryptionStatus.Encrypted;
7881
}

0 commit comments

Comments
 (0)