Skip to content

Bug in VerifyNSG() function result initialisation - #504

Merged
Umachandar Jayachandran (uc-msft) merged 1 commit into
microsoft:masterfrom
bengimblett:patch-1
Jan 29, 2019
Merged

Umachandar Jayachandran (uc-msft) merged 1 commit into
microsoft:masterfrom
bengimblett:patch-1

Conversation

@bengimblett

Copy link
Copy Markdown
Contributor

VerifyNSG() has a simple bug - on entering the function the result success flag is incorrectly initialised to $true (optimistic) - when it should be initialised to $false (pessimistic) ... The function can ONLY be successful on one path; IF an NSG is found WITH valid rules. As it was, if NO NSG is found the function will STILL return success and therefore the following script / code used for mitigation will not be executed.

VerifyNSG() has a simple bug - on entering the function the result success flag is incorrectly initialised to $true (optimistic) - when it should be initialised to $false (pessimistic) ... The function can ONLY be successful on one path; IF an NSG is found WITH valid rules. As it was, if NO NSG is found the function will STILL return success and therefore the following script / code used for mitigation will not be executed.
@uc-msft
Umachandar Jayachandran (uc-msft) merged commit 8134b8a into microsoft:master Jan 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants