-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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 regex string for **Del and **DelVals #56060
Conversation
@lomeroe Would you mind taking a look at this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
4951db3
to
1006117
Compare
The regex string that updates the Registry.pol file wasn't properly matching instances where the reg_key was prepended with **Del or **DelVals due to the utf-16-le encoding of the Registry.pol file. This adds the null byte characters to the regex portion that searches for those values.
78dbad3
to
ca260ef
Compare
Heh, thanks for this @twangboy! I was just troubleshooting the same issue, but in the
|
What does this PR do?
The regex string that updates the Registry.pol file wasn't properly matching instances where the reg_key was prepended with **Del or **DelVals due to the utf-16-le encoding of the Registry.pol file.
This adds the null byte characters to the regex portion that searches for those values.
Related issue
#56062
Previous Behavior
The example I was working with was the
Default Consent
key which renders in the Registry.pol file like this: "D e f a u l t C o n s e n t
". Where the spaces between the characters are null bytes. (utf-16-le)When this policy is disabled there is some additional text prepended, like this: "
* * d e l . D e f a u l t C o n s e n t
"The original regex did not include the null byte characters and therefore could not find the policy that needed to be changed, so it appended the new setting to the file. This caused there to be two conflicting entries in the file for the same setting.
New Behavior
Null byte characters are accounted for and you can now set this policy.
Tests written?
Yes
Commits signed with GPG?
Yes