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

Consider using local scope for PowerShell Core built in variables to prevent spoofing on Windows PowerShell #13

Open
msftrncs opened this issue Jun 30, 2022 · 0 comments
Assignees

Comments

@msftrncs
Copy link
Owner

) -join $(if (-not $Compress) { "$(if (-not $IsCoreCLR -or $IsWindows) { "`r" })`n" })

For instance, add local: to the use of $IsCoreCLR and $IsWindows, as they do not exist on Windows PowerShell, but could have been defined in a parent scope, possibly unrelated to the PowerShell Core implementation of the built in version of these variables.

@msftrncs msftrncs self-assigned this Jun 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant