Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix NPE in Windows Defender autofix Powershell script on first exclusion #1684

Conversation

HannesWell
Copy link
Member

If a user has no process-exclusion defined in its Windows Defender configuration yet, the expression
(Get-MpPreference).ExclusionProcess returns null in the Powershell script to perform the exclusion.
If a null reference is read, the variable is now initialized with an empty set.

If a user has no process-exclusion defined in its Windows Defender
configuration yet, the expression '(Get-MpPreference).ExclusionProcess'
returns null in the Powershell script to perform the exclusion.
If a null reference is read, the variable is now initialized with an
empty set.
Copy link
Contributor

Test Results

   918 files  +    1     918 suites  +1   1h 9m 43s ⏱️ + 30m 33s
 7 434 tests ±    0   7 284 ✅ +    1  150 💤 ±  0  0 ❌  - 1 
23 451 runs  +1 573  22 949 ✅ +1 455  502 💤 +119  0 ❌  - 1 

Results for commit 3200785. ± Comparison against base commit 01bc2d8.

@HannesWell HannesWell merged commit e23ac65 into eclipse-platform:master Feb 14, 2024
16 checks passed
@HannesWell HannesWell deleted the windows-defender-exclusion-npe-fix branch February 14, 2024 21:26
@HannesWell
Copy link
Member Author

Verified that it is now working as expected.
Everyone that used yesterdays I-build and had run the exclusion check should update its installation and rerun the exclusion check via the preferences General -> Startup and shutdown.

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.

1 participant