-
Notifications
You must be signed in to change notification settings - Fork 495
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
Get-M365DSCExportContentForResource: Doesn't escape double quotes if string is inside an array #5161
Comments
@FabienTschanz I was looking at your change microsoft/ReverseDSC#37 and looking at the code there it looks like the same treatment is missing for String[] starting here: https:/microsoft/ReverseDSC/blob/e3bf08d5b0d22a95103fd02ea942843583d70b07/ReverseDSC.Core.psm1#L224 |
@ricmestre I'll take a look at it later. Got my hands busy with the replacement for #5073 🙃 |
No issue, I raised microsoft/ReverseDSC#38 to fix this @NikCharlebois Could you please check this ReverseDSC PR? |
Description of the issue
In my solution I need to call ConvertTo-DSCObject and then inversely Get-M365DSCExportContentForResource, when calling the latter it's able to escape double quotes if they are simple strings but if they're inside an array then they are not escaped which will generate an error once I try to compile the new blueprint.
See the configuration below, I added a Test property which gets escaped properly when calling Get-M365DSCExportContentForResource, but the original property SubjectOrBodyMatchesPatterns since it's inside an array doesn't.
Microsoft 365 DSC Version
1.24.1002.1
Which workloads are affected
other
The DSC configuration
Verbose logs showing the problem
N/A
Environment Information + PowerShell Version
The text was updated successfully, but these errors were encountered: