Title: PSNativePSPathResolution breaks passing strings starting with ":" to native tools · Issue #13638 · PowerShell/PowerShell · GitHub
Open Graph Title: PSNativePSPathResolution breaks passing strings starting with ":" to native tools · Issue #13638 · PowerShell/PowerShell
X Title: PSNativePSPathResolution breaks passing strings starting with ":" to native tools · Issue #13638 · PowerShell/PowerShell
Description: Steps to reproduce PS> cmd /c echo ":(top,exclude).*" Expected behavior :(top,exclude).* Actual behavior C:\Users\duhowett\src\openconsole-inbox\:(top,exclude).* Environment data Name Value ---- ----- PSVersion 7.1.0-preview.7 PSEdition ...
Open Graph Description: Steps to reproduce PS> cmd /c echo ":(top,exclude).*" Expected behavior :(top,exclude).* Actual behavior C:\Users\duhowett\src\openconsole-inbox\:(top,exclude).* Environment data Name Value ---- --...
X Description: Steps to reproduce PS> cmd /c echo ":(top,exclude).*" Expected behavior :(top,exclude).* Actual behavior C:\Users\duhowett\src\openconsole-inbox\:(top,exclude).* Environment data Name ...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/13638
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"PSNativePSPathResolution breaks passing strings starting with \":\" to native tools","articleBody":"## Steps to reproduce\r\n\r\n```powershell\r\nPS> cmd /c echo \":(top,exclude).*\"\r\n```\r\n\r\n## Expected behavior\r\n\r\n```none\r\n:(top,exclude).*\r\n```\r\n\r\n## Actual behavior\r\n\r\n```none\r\nC:\\Users\\duhowett\\src\\openconsole-inbox\\:(top,exclude).*\r\n```\r\n\r\n## Environment data\r\n\r\n\u003c!-- provide the output of $PSVersionTable -->\r\n\r\n```none\r\nName Value\r\n---- -----\r\nPSVersion 7.1.0-preview.7\r\nPSEdition Core\r\nGitCommitId 7.1.0-preview.7\r\nOS Microsoft Windows 10.0.19042\r\nPlatform Win32NT\r\nPSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}\r\nPSRemotingProtocolVersion 2.3\r\nSerializationVersion 1.1.0.1\r\nWSManStackVersion 3.0\r\n```\r\n\r\nIt appears as though the check here\r\n\r\nhttps://github.com/PowerShell/PowerShell/blob/3effa204103460c996a8612aa70718fdf924047d/src/System.Management.Automation/engine/NativeCommandParameterBinder.cs#L388-L406\r\n\r\nis not strict enough.\r\n\r\nI encountered this by trying to use a `git` globbing expression, which can begin with `:` to introduce a set of flags.\r\n\r\n```powershell\r\nPS> & git log \":(top,exclude).git/\" \":(top,exclude)**/*.rec\"\r\nfatal: invalid object name 'C'.\r\n```","author":{"url":"https://github.com/DHowett","@type":"Person","name":"DHowett"},"datePublished":"2020-09-15T21:56:35Z","url":"https://github.com/PowerShell/PowerShell/issues/13638"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:24933fa6-b544-4a47-3385-6af941d12805 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9E88:FF19:1758E8:2041A4:6AFD9CD5 |
| html-safe-nonce | 7875049433d77abc48e0e5899b47284c440b030787452eb88b5aec02dc757499 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RTg4OkZGMTk6MTc1OEU4OjIwNDFBNDo2QUZEOUNENSIsInZpc2l0b3JfaWQiOiI2NjQ0NjE5MDcyMjEyMTQ3NDEzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | d79382a5caa542048c8e6ba65058362263af2a19ba70c011378fb049c4391fac |
| hovercard-subject-tag | issue:702300427 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PowerShell/PowerShell/13638/issue_layout |
| twitter:image | https://opengraph.githubassets.com/8fe62400ce3ae983e50a1464ab6fa13825df71b8bc33882411f02c926710d54a/PowerShell/PowerShell/issues/13638 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/8fe62400ce3ae983e50a1464ab6fa13825df71b8bc33882411f02c926710d54a/PowerShell/PowerShell/issues/13638 |
| og:image:alt | Steps to reproduce PS> cmd /c echo ":(top,exclude).*" Expected behavior :(top,exclude).* Actual behavior C:\Users\duhowett\src\openconsole-inbox\:(top,exclude).* Environment data Name Value ---- --... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | DHowett |
| hostname | github.com |
| expected-hostname | github.com |
| None | bc86424ef34a73b386237872800e922d149d65ba907f63d6f150a2dcb8433bea |
| turbo-cache-control | no-preview |
| go-import | github.com/PowerShell/PowerShell git https://github.com/PowerShell/PowerShell.git |
| octolytics-dimension-user_id | 11524380 |
| octolytics-dimension-user_login | PowerShell |
| octolytics-dimension-repository_id | 49609581 |
| octolytics-dimension-repository_nwo | PowerShell/PowerShell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 49609581 |
| octolytics-dimension-repository_network_root_nwo | PowerShell/PowerShell |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 927a6c5ab1c32b38830f1b9d3050c0b9e9aa92e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width