azure-powershell
azure-powershell copied to clipboard
Fix VNet rule null checks in UpdateAzCosmoDBAccount.cs
UpdateAzCosmosDBAccount.cs
Fix VNet rule check. Currently checks if string array OR object array are null, but then attempts to iterate through both of them; if only one is specified as is typical when selecting parameter set, then a Null Reference Exception is thrown.
Reference: https://docs.microsoft.com/en-us/powershell/module/az.cosmosdb/update-azcosmosdbaccount
Code: https://github.com/Azure/azure-powershell/blob/master/src/CosmosDB/CosmosDB/CosmosDBAccount/UpdateAzCosmosDBAccount.cs#L155
In PR https://github.com/Azure/azure-powershell/pull/11388