René's URL Explorer Experiment


Title: bug: get-item registry slash-magic trim'ing incorrectly · Issue #15342 · PowerShell/PowerShell · GitHub

Open Graph Title: bug: get-item registry slash-magic trim'ing incorrectly · Issue #15342 · PowerShell/PowerShell

X Title: bug: get-item registry slash-magic trim'ing incorrectly · Issue #15342 · PowerShell/PowerShell

Description: Steps to reproduce pre-setup: registry keys: HKEY_CURRENT_USER\test\noslashes HKEY_CURRENT_USER\test\some/test/key/ HKEY_CURRENT_USER\test\another//caveat/ or as a file.reg: Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\test] [...

Open Graph Description: Steps to reproduce pre-setup: registry keys: HKEY_CURRENT_USER\test\noslashes HKEY_CURRENT_USER\test\some/test/key/ HKEY_CURRENT_USER\test\another//caveat/ or as a file.reg: Windows Registry Editor...

X Description: Steps to reproduce pre-setup: registry keys: HKEY_CURRENT_USER\test\noslashes HKEY_CURRENT_USER\test\some/test/key/ HKEY_CURRENT_USER\test\another//caveat/ or as a file.reg: Windows Registry Editor...

Opengraph URL: https://github.com/PowerShell/PowerShell/issues/15342

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"bug: get-item registry slash-magic trim'ing incorrectly","articleBody":"\u003c!--\r\n\r\nFor Windows PowerShell 5.1 issues, suggestions, or feature requests please use the following link instead:\r\nWindows PowerShell [UserVoice](https://windowsserver.uservoice.com/forums/301869-powershell)\r\n\r\nThis repository is **ONLY** for PowerShell Core 6 and PowerShell 7+ issues.\r\n\r\n- Make sure you are able to repro it on the [latest released version](https://github.com/PowerShell/PowerShell/releases)\r\n- Search the existing issues.\r\n- Refer to the [FAQ](https://github.com/PowerShell/PowerShell/blob/master/docs/FAQ.md).\r\n- Refer to the [known issues](https://docs.microsoft.com/powershell/scripting/whats-new/known-issues-ps6).\r\n\r\n-->\r\n\r\n## Steps to reproduce\r\n\r\npre-setup:\r\n- registry keys: \r\n  - `HKEY_CURRENT_USER\\test\\noslashes`\r\n  - `HKEY_CURRENT_USER\\test\\some/test/key/`\r\n  - `HKEY_CURRENT_USER\\test\\another//caveat/`\r\n- or as a file.reg:\r\n  - ```\r\n    Windows Registry Editor Version 5.00\r\n    [HKEY_CURRENT_USER\\test]\r\n    [HKEY_CURRENT_USER\\test\\another//caveat/]\r\n    [HKEY_CURRENT_USER\\test\\noslashes]\r\n    [HKEY_CURRENT_USER\\test\\some/test/key/]\r\n    ```\r\n\r\n```powershell\r\n## should work (and works)\r\nget-item HKCU:\\test\\noslashes\r\n\r\n\r\n## should error (and it 'works' by triming slashes)\r\nget-item HKCU:\\test\\noslashes//////\r\n\r\n\r\n## should error (and it errors)\r\nget-item HKCU:\\test\\some/test/key\r\n\r\n\r\n## should work (and it shows broken behavior)\r\nget-item HKCU:\\test\\some/test/key/\r\n\r\n\r\n## should error (and it 'works' by triming slashes)\r\nget-item HKCU:\\test\\some/test/key////\r\n\r\n\r\n## should work (and it errors)\r\nget-item HKCU:\\test\\another//caveat/\r\n\r\n```\r\n\r\n\r\n\r\n## Expected behavior\r\n\r\n```none\r\nPS HKCU:\\> ## should work (and works)\r\nPS HKCU:\\> get-item HKCU:\\test\\noslashes\r\n\r\n    Hive: HKEY_CURRENT_USER\\test\r\n\r\nName                           Property\r\n----                           --------\r\nnoslashes\r\n\r\n\r\n\r\n\r\nPS HKCU:\\> ## should error (and it 'works' by triming slashes)\r\nPS HKCU:\\> get-item HKCU:\\test\\noslashes//////\r\nGet-Item: Cannot find path 'HKCU:\\test\\noslashes//////' because it does not exist.\r\n\r\n\r\n\r\n\r\nPS HKCU:\\> ## should error (and it errors)\r\nPS HKCU:\\> get-item HKCU:\\test\\some/test/key\r\nGet-Item: Cannot find path 'HKCU:\\test\\some\\test\\key' because it does not exist.\r\n\r\n\r\n\r\nPS HKCU:\\> ## should work (and it shows broken behavior)\r\nPS HKCU:\\> get-item HKCU:\\test\\some/test/key/\r\n\r\n    Hive: HKEY_CURRENT_USER\\test\r\n\r\nName                           Property\r\n----                           --------\r\nsome/test/key/\r\n\r\n\r\n\r\n\r\nPS HKCU:\\> ## should error (and it 'works' by triming slashes)\r\nPS HKCU:\\> get-item HKCU:\\test\\some/test/key////\r\nGet-Item: Cannot find path 'HKCU:\\test\\some/test/key////' because it does not exist.\r\n\r\n\r\n\r\n\r\nPS HKCU:\\> ## should work (and it errors)\r\nPS HKCU:\\> get-item HKCU:\\test\\another//caveat/\r\n\r\n    Hive: HKEY_CURRENT_USER\\test\r\n\r\nName                           Property\r\n----                           --------\r\nanother//caveat/\r\n```\r\n\r\n\r\n\r\n\r\n## Actual behavior (ps 7.1.3)\r\n\r\n```none\r\nPS HKCU:\\> ## should work (and works)\r\nPS HKCU:\\> get-item HKCU:\\test\\noslashes\r\n\r\n    Hive: HKEY_CURRENT_USER\\test\r\n\r\nName                           Property\r\n----                           --------\r\nnoslashes\r\n\r\n\r\n\r\n\r\nPS HKCU:\\> ## should error (and it 'works' by triming slashes)\r\nPS HKCU:\\> get-item HKCU:\\test\\noslashes//////\r\n\r\n    Hive: HKEY_CURRENT_USER\\test\r\n\r\nName                           Property\r\n----                           --------\r\nnoslashes\r\n\r\n\r\n\r\n\r\nPS HKCU:\\> ## should error (and it errors)\r\nPS HKCU:\\> get-item HKCU:\\test\\some/test/key\r\nGet-Item: Cannot find path 'HKCU:\\test\\some\\test\\key' because it does not exist.\r\n\r\n\r\n\r\nPS HKCU:\\> ## should work (and it shows broken behavior)\r\nPS HKCU:\\> get-item HKCU:\\test\\some/test/key/\r\n\r\n    Hive: HKEY_CURRENT_USER\\test\r\n\r\nName                           Property\r\n----                           --------\r\nkey\r\n\r\n\r\n\r\n\r\nPS HKCU:\\> ## should error (and it 'works' by triming slashes)\r\nPS HKCU:\\> get-item HKCU:\\test\\some/test/key////\r\n\r\n    Hive: HKEY_CURRENT_USER\\test\r\n\r\nName                           Property\r\n----                           --------\r\nkey\r\n\r\n\r\n\r\n\r\nPS HKCU:\\> ## should work (and it errors)\r\nPS HKCU:\\> get-item HKCU:\\test\\another//caveat/\r\nGet-Item: Cannot find path 'HKCU:\\test\\another\\caveat\\' because it does not exist.\r\n```\r\n\r\n## Environment data (ps 7.1.3)\r\n\r\n\u003c!-- provide the output of $PSVersionTable -->\r\n\r\n```none\r\nName                           Value\r\n----                           -----\r\nPSVersion                      7.1.3\r\nPSEdition                      Core\r\nGitCommitId                    7.1.3\r\nOS                             Microsoft Windows 6.3.9600\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\n\r\n\r\n## potentially related\r\n- https://github.com/PowerShell/PowerShell/issues/5536\r\n- https://github.com/PowerShell/PowerShell/pull/8587\r\n \r\n","author":{"url":"https://github.com/vanillaSprinkles","@type":"Person","name":"vanillaSprinkles"},"datePublished":"2021-05-03T21:19:02Z","url":"https://github.com/PowerShell/PowerShell/issues/15342"}

react-profiling0
react-import-mapreact,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-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:eafbcbf4-f0ac-c277-d8d5-cea9be10024c
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idBD0C:3FAC3:C9454:124137:6AFD723B
html-safe-nonce076607a29a2487f975f5d5fd2afd38c0ab137cb8e2617df5607021520974b1a1
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRDBDOjNGQUMzOkM5NDU0OjEyNDEzNzo2QUZENzIzQiIsInZpc2l0b3JfaWQiOiI4MzY2NjA0NjUyNDA5MzUyNzYzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac4872f1c497b17f0a2caef4ad092e078db9b6a9d5b85bb9b0e36854b852a1886f
hovercard-subject-tagissue:874918810
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PowerShell/PowerShell/15342/issue_layout
twitter:imagehttps://opengraph.githubassets.com/45d7bc360049f48377ad2bdf59386f8246626d583be88395b48fab24347d6b22/PowerShell/PowerShell/issues/15342
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/45d7bc360049f48377ad2bdf59386f8246626d583be88395b48fab24347d6b22/PowerShell/PowerShell/issues/15342
og:image:altSteps to reproduce pre-setup: registry keys: HKEY_CURRENT_USER\test\noslashes HKEY_CURRENT_USER\test\some/test/key/ HKEY_CURRENT_USER\test\another//caveat/ or as a file.reg: Windows Registry Editor...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamevanillaSprinkles
hostnamegithub.com
expected-hostnamegithub.com
Nonee54006cf2b96d1ac260960edd10003132911469ccd1ec99c9803119fe2a4e032
turbo-cache-controlno-preview
go-importgithub.com/PowerShell/PowerShell git https://github.com/PowerShell/PowerShell.git
octolytics-dimension-user_id11524380
octolytics-dimension-user_loginPowerShell
octolytics-dimension-repository_id49609581
octolytics-dimension-repository_nwoPowerShell/PowerShell
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id49609581
octolytics-dimension-repository_network_root_nwoPowerShell/PowerShell
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release5be0bf2b8cf26f8897d31e6bc3c232d328b12a54
ui-targetcanary-1
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/PowerShell/PowerShell/issues/15342#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FPowerShell%2FPowerShell%2Fissues%2F15342
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FPowerShell%2FPowerShell%2Fissues%2F15342
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=PowerShell%2FPowerShell
Reloadhttps://github.com/PowerShell/PowerShell/issues/15342
Reloadhttps://github.com/PowerShell/PowerShell/issues/15342
Reloadhttps://github.com/PowerShell/PowerShell/issues/15342
PowerShellhttps://github.com/PowerShell
PowerShellhttps://github.com/PowerShell/PowerShell
Codehttps://github.com/PowerShell/PowerShell
Issues1.3k (1.3k)https://github.com/PowerShell/PowerShell/issues
Pull requests365 (365)https://github.com/PowerShell/PowerShell/pulls
Discussionshttps://github.com/PowerShell/PowerShell/discussions
Actionshttps://github.com/PowerShell/PowerShell/actions
Projectshttps://github.com/PowerShell/PowerShell/projects
Security and quality3 (3)https://github.com/PowerShell/PowerShell/security
Insightshttps://github.com/PowerShell/PowerShell/insights
https://github.com/PowerShell/PowerShell
New issuehttps://github.com/login?return_to=https://github.com/PowerShell/PowerShell/issues/15342
New issuehttps://github.com/login?return_to=https://github.com/PowerShell/PowerShell/issues/15342
bug: get-item registry slash-magic trim'ing incorrectlyhttps://github.com/PowerShell/PowerShell/issues/15342#top
Resolution-DuplicateThe issue is a duplicate.https://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Resolution-Duplicate%22
WG-Engine-Providersbuilt-in PowerShell providers such as FileSystem, Certificates, Registry, etc.https://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22WG-Engine-Providers%22
https://github.com/vanillaSprinkles
vanillaSprinkles (vanillaSprinkles)https://github.com/vanillaSprinkles
on May 3, 2021https://github.com/PowerShell/PowerShell/issues/15342#issue-874918810
Bug: can not handle "/" correctly when reading registry item #5536https://github.com/PowerShell/PowerShell/issues/5536
Add support for PathSeparator property in Providers #8587https://github.com/PowerShell/PowerShell/pull/8587
vanillaSprinkles (vanillaSprinkles)https://github.com/vanillaSprinkles
Needs-TriageThe issue is new and needs to be triaged by a work group.https://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Needs-Triage%22
on May 3, 2021https://github.com/PowerShell/PowerShell/issues/15342#event-4680263881
Dongbo Wang (daxian-dbw)https://github.com/daxian-dbw
WG-Engine-Providersbuilt-in PowerShell providers such as FileSystem, Certificates, Registry, etc.https://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22WG-Engine-Providers%22
on May 4, 2021https://github.com/PowerShell/PowerShell/issues/15342#event-4686095342
https://github.com/vanillaSprinkles
vanillaSprinkles (vanillaSprinkles)https://github.com/vanillaSprinkles
on May 10, 2021https://github.com/PowerShell/PowerShell/issues/15342#issuecomment-836421570
https://github.com/renehernandez/PowerShell/blob/master/src/System.Management.Automation/namespaces/RegistryProvider.cs#L2937https://github.com/renehernandez/PowerShell/blob/master/src/System.Management.Automation/namespaces/RegistryProvider.cs#L2937
https://camo.githubusercontent.com/a2f891f28953a24289329a32a45abb2f15f8a017f37bd797f1a8c5a71e8db531/68747470733a2f2f6f70656e67726170682e6769746875626173736574732e636f6d2f343436653036653834653138323462343865383564633861386336396262663939613935613637666630646633313831366664613834353839646632623033372f72656e656865726e616e64657a2f506f7765725368656c6c
https://camo.githubusercontent.com/7e41d4698b37a89b2a8c06057583a5f48ce614b0fb7e2b93d27a2ec01c8f024b/68747470733a2f2f6769746875622e6769746875626173736574732e636f6d2f66617669636f6e732f66617669636f6e2e737667
renehernandez/PowerShellhttps://github.com/renehernandez/PowerShell
https://github.com/rjmholt
Rob Holt (rjmholt)https://github.com/rjmholt
on May 25, 2021https://github.com/PowerShell/PowerShell/issues/15342#issuecomment-848247045
#5536https://github.com/PowerShell/PowerShell/issues/5536
Dongbo Wang (daxian-dbw)https://github.com/daxian-dbw
Resolution-DuplicateThe issue is a duplicate.https://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Resolution-Duplicate%22
Needs-TriageThe issue is new and needs to be triaged by a work group.https://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Needs-Triage%22
on May 28, 2021https://github.com/PowerShell/PowerShell/issues/15342#event-4809273884
https://github.com/daxian-dbw
Dongbo Wang (daxian-dbw)https://github.com/daxian-dbw
on May 28, 2021https://github.com/PowerShell/PowerShell/issues/15342#issuecomment-850057628
#5536https://github.com/PowerShell/PowerShell/issues/5536
completedhttps://github.com/PowerShell/PowerShell/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on May 29, 2021https://github.com/PowerShell/PowerShell/issues/15342#event-4815602710
Sign up for freehttps://github.com/signup?return_to=https://github.com/PowerShell/PowerShell/issues/15342
Sign in to commenthttps://github.com/login?return_to=https://github.com/PowerShell/PowerShell/issues/15342
Resolution-DuplicateThe issue is a duplicate.https://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Resolution-Duplicate%22
WG-Engine-Providersbuilt-in PowerShell providers such as FileSystem, Certificates, Registry, etc.https://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22WG-Engine-Providers%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.