mirror of
https://github.com/Raphire/Win11Debloat.git
synced 2026-07-02 22:58:34 +00:00
Guard against loading, saving & executing undefined features (#665)
This commit is contained in:
@@ -21,6 +21,9 @@ function LoadSettings {
|
||||
|
||||
$feature = $script:Features[$setting.Name]
|
||||
|
||||
# Skip unknown settings that aren't defined in Features.json
|
||||
if (-not $feature) { continue }
|
||||
|
||||
# Check version and feature compatibility using Features.json
|
||||
if (($feature.MinVersion -and $WinVersion -lt $feature.MinVersion) -or ($feature.MaxVersion -and $WinVersion -gt $feature.MaxVersion) -or ($feature.FeatureId -eq 'DisableModernStandbyNetworking' -and (-not $script:ModernStandbySupported))) {
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user