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

String literals are not escaped properly in output MOF. #13

Open
rhencke opened this issue May 19, 2015 · 1 comment
Open

String literals are not escaped properly in output MOF. #13

rhencke opened this issue May 19, 2015 · 1 comment
Labels
bug The issue is a bug. help wanted The issue is up for grabs for anyone in the community.

Comments

@rhencke
Copy link

rhencke commented May 19, 2015

MOF strings have escaping rules that are not honored by the current xDSCResourceDesigner implementation, which can cause xDSCResourceDesigner to create MOF files with syntax errors.

For example:

<snip>
New-xDscResourceProperty `
    -Name Account `
    -Description 'User name must be specified in the form of DOMAIN\USER' `
    -Type PSCredential `
    -Attribute Required
<snip>

will generate an invalid MOF string literal of:

"User name must be specified in the form of DOMAIN\USER"

The correct MOF string literal should be:

"User name must be specified in the form of DOMAIN\\USER"

See http://www.dmtf.org/sites/default/files/standards/documents/DSP0221_3.0.0.pdf, line 1089 for the full specification for MOF strings.

@TravisEz13 TravisEz13 added bug The issue is a bug. Up-for-grabs labels May 20, 2015
@kwirkykat kwirkykat added the help wanted The issue is up for grabs for anyone in the community. label Aug 18, 2016
@adamrushuk
Copy link

I got burned by this bug today when using "Format: Domain\Account Name\Password" in the Description text. :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue is a bug. help wanted The issue is up for grabs for anyone in the community.
Projects
None yet
Development

No branches or pull requests

5 participants