Title: Simple but annoying bug: PowerShell stops working if there is a = in the path of the Script · Issue #6087 · PowerShell/PowerShell · GitHub
Open Graph Title: Simple but annoying bug: PowerShell stops working if there is a = in the path of the Script · Issue #6087 · PowerShell/PowerShell
X Title: Simple but annoying bug: PowerShell stops working if there is a = in the path of the Script · Issue #6087 · PowerShell/PowerShell
Description: Steps to reproduce Create the following useles but valid script in a directory containing an equal sign (=), e.g. c:\temp\=PSTest\Test.ps1 Enum State { Unknown = 1 New = 2 } Start the Script. You'll get: The given assembly name or codeba...
Open Graph Description: Steps to reproduce Create the following useles but valid script in a directory containing an equal sign (=), e.g. c:\temp\=PSTest\Test.ps1 Enum State { Unknown = 1 New = 2 } Start the Script. You'l...
X Description: Steps to reproduce Create the following useles but valid script in a directory containing an equal sign (=), e.g. c:\temp\=PSTest\Test.ps1 Enum State { Unknown = 1 New = 2 } Start the Script. You...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/6087
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Simple but annoying bug: PowerShell stops working if there is a = in the path of the Script","articleBody":"Steps to reproduce\r\n---------------\r\n1. **Create the following useles but valid script in a directory containing an equal sign (=), e.g.\r\nc:\\temp\\\\=PSTest\\Test.ps1**\r\n```PowerShell\r\nEnum State {\r\n\tUnknown = 1\r\n\tNew = 2\r\n}\r\n```\r\n2. Start the Script. You'll get:\r\n```\r\nThe given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)\r\n…\r\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n + CategoryInfo : OperationStopped: (:) [], FileLoadException\r\n + FullyQualifiedErrorId : System.IO.FileLoadException\r\n```\r\n\r\nExpected behavior\r\n---------------\r\nIt's obvious: No valid character in the path of a PowerShell Script is allowed to affect the Script execution.\r\n\r\nActual behavior\r\n---------------\r\nPowerShell stops working with an exception because characters in the path of a PowerShell script can affect the PowerShell runtime.\r\nI guess that a hacker is able to control powershell just by using special characters in the path of a script because PowerShell probably tries to interpret those characters.\r\n\r\nEnvironment data\r\n----------------\r\n```powershell\r\n> $PSVersionTable\r\nName Value\r\n---- -----\r\nPSVersion 5.1.16299.98\r\nPSEdition Desktop\r\nPSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}\r\nBuildVersion 10.0.16299.98\r\nCLRVersion 4.0.30319.42000\r\nWSManStackVersion 3.0\r\nPSRemotingProtocolVersion 2.3\r\nSerializationVersion 1.1.0.1\r\n\r\n```\r\n","author":{"url":"https://github.com/schittli","@type":"Person","name":"schittli"},"datePublished":"2018-02-01T21:49:57Z","url":"https://github.com/PowerShell/PowerShell/issues/6087"}
| 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:59e6495e-dc5e-9466-0077-d27b5ef31c5c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8D20:276D93:7C7E7:AB144:6AFD8AD5 |
| html-safe-nonce | 1f71dc87098a87b4ef2a7d78c3c6f0e7d249b610c8f299f3bd5c588722947c67 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RDIwOjI3NkQ5Mzo3QzdFNzpBQjE0NDo2QUZEOEFENSIsInZpc2l0b3JfaWQiOiI5MTQzMzM2MjYzNjg2NjU0Njc4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 0034ef4319f6a4b4bb90249f3789b97083260a863f2c4e88906ea41b1cecc740 |
| hovercard-subject-tag | issue:293695973 |
| 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/6087/issue_layout |
| twitter:image | https://opengraph.githubassets.com/34ad57f2eceb3e1c806ee1f47bfd2b46bd11dec8242691fc88dee16a2d8b5d28/PowerShell/PowerShell/issues/6087 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/34ad57f2eceb3e1c806ee1f47bfd2b46bd11dec8242691fc88dee16a2d8b5d28/PowerShell/PowerShell/issues/6087 |
| og:image:alt | Steps to reproduce Create the following useles but valid script in a directory containing an equal sign (=), e.g. c:\temp\=PSTest\Test.ps1 Enum State { Unknown = 1 New = 2 } Start the Script. You'l... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | schittli |
| 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