Skip to content

Commit

Permalink
remove date parse callback from wufb resource
Browse files Browse the repository at this point in the history
Summary:
Who would have thought there would be an actual value in this registry key?
Basically if there is a value in `HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate\PauseFeatureUpdatesStartTime` the resource will try to validate the date and fail if it doesn't match expectations, e.g.:
```
PS > Get-ItemProperty HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate -Name PauseFeatureUpdatesStartTime

PauseFeatureUpdatesStartTime : 0

PS > soloctl -icH
...
Recipe: cpe_windows_update_for_business::default
  * cpe_windows_update_for_business[Configure Windows Update for Business] action config

    ================================================================================
    Error executing action `config` on resource 'cpe_windows_update_for_business[Configure Windows Update for Business]'
    ================================================================================

    Date::Error
    -----------
    invalid date
```

We're still trying to mitigate CVE-2024-38063 so at this point the explicit `nil` value in the custom resource means this will clear whatever value is there. Since we want folks to update as soon as possible this may be more preferable behavior. Once we're out of the danger zone we can revisit validating this setting.

Differential Revision: D61515598

fbshipit-source-id: 9fdfaf79851bd186723cd5ed17cd58e4d139500d
  • Loading branch information
Daniel Sedlacek authored and facebook-github-bot committed Aug 20, 2024
1 parent 93071b0 commit b6a6c50
Showing 1 changed file with 0 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,22 +61,12 @@

property :pause_quality_updates_start_time,
[String, NilClass],
:callbacks => {
'is not in yyyy-mm-dd format' => lambda { |v|
DateTime.parse(v).strftime('%Y-%m-%d') == v
},
},
:default => lazy {
node['cpe_windows_update_for_business']['pause_quality_updates_start_time']
}

property :pause_feature_updates_start_time,
[String, NilClass],
:callbacks => {
'is not in yyyy-mm-dd format' => lambda { |v|
DateTime.parse(v).strftime('%Y-%m-%d') == v
},
},
:default => lazy {
node['cpe_windows_update_for_business']['pause_feature_updates_start_time']
}
Expand Down

0 comments on commit b6a6c50

Please sign in to comment.