-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Add note about trusting ApplicationArguments data #12746
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,7 +2,7 @@ | |
| external help file: System.Management.Automation.dll-Help.xml | ||
| Locale: en-US | ||
| Module Name: Microsoft.PowerShell.Core | ||
| ms.date: 12/09/2022 | ||
| ms.date: 02/10/2026 | ||
| online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/new-pssessionoption?view=powershell-7.5&WT.mc_id=ps-gethelp | ||
| schema: 2.0.0 | ||
| title: New-PSSessionOption | ||
|
|
@@ -267,11 +267,17 @@ The final `Invoke-Command` shows how the data might be used. | |
|
|
||
| ### -ApplicationArguments | ||
|
|
||
| Specifies a **PrimitiveDictionary** that is sent to the remote session. Commands and scripts in the | ||
| Specifies a **PrimitiveDictionary** that's sent to the remote session. Commands and scripts in the | ||
| remote session, including startup scripts in the session configuration, can find this dictionary in | ||
| the **ApplicationArguments** property of the `$PSSenderInfo` automatic variable. You can use this | ||
| parameter to send data to the remote session. | ||
|
|
||
| > [!IMPORTANT] | ||
| > Since this property contains data explicitly provided by the client, using this for security | ||
| > decisions could allow attackers to bypass authorization controls. Never use this data for trust | ||
| > decisions. [Validate all user input](https://top10proactive.owasp.org/archive/2024/the-top-10/c3-validate-input-and-handle-exceptions/) | ||
| > when used for other application logic. | ||
|
|
||
| For more information, see [about_Hash_Tables](About/about_Hash_Tables.md), | ||
| [about_Session_Configurations](About/about_Session_Configurations.md), and | ||
| [about_Automatic_Variables](About/about_Automatic_Variables.md). | ||
|
Comment on lines
281
to
283
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,7 +2,7 @@ | |
| external help file: System.Management.Automation.dll-Help.xml | ||
| Locale: en-US | ||
| Module Name: Microsoft.PowerShell.Core | ||
| ms.date: 12/09/2022 | ||
| ms.date: 02/10/2026 | ||
| online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/new-pssessionoption?view=powershell-7.6&WT.mc_id=ps-gethelp | ||
| schema: 2.0.0 | ||
| title: New-PSSessionOption | ||
|
|
@@ -267,14 +267,20 @@ The final `Invoke-Command` shows how the data might be used. | |
|
|
||
| ### -ApplicationArguments | ||
|
|
||
| Specifies a **PrimitiveDictionary** that is sent to the remote session. Commands and scripts in the | ||
| Specifies a **PrimitiveDictionary** that's sent to the remote session. Commands and scripts in the | ||
| remote session, including startup scripts in the session configuration, can find this dictionary in | ||
| the **ApplicationArguments** property of the `$PSSenderInfo` automatic variable. You can use this | ||
| parameter to send data to the remote session. | ||
|
|
||
| For more information, see [about_Hash_Tables](about/about_Hash_Tables.md), | ||
| > [!IMPORTANT] | ||
| > Since this property contains data explicitly provided by the client, using this for security | ||
| > decisions could allow attackers to bypass authorization controls. Never use this data for trust | ||
| > decisions. [Validate all user input](https://top10proactive.owasp.org/archive/2024/the-top-10/c3-validate-input-and-handle-exceptions/) | ||
| > when used for other application logic. | ||
|
|
||
| For more information, see [about_Hash_Tables](About/about_Hash_Tables.md), | ||
| [about_Session_Configurations](About/about_Session_Configurations.md), and | ||
| [about_Automatic_Variables](about/about_Automatic_Variables.md). | ||
| [about_Automatic_Variables](About/about_Automatic_Variables.md). | ||
|
Comment on lines
+281
to
+283
|
||
|
|
||
| ```yaml | ||
| Type: System.Management.Automation.PSPrimitiveDictionary | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
online versionURL is usingview=powershell-5.1in the 7.4 reference topic, which will send readers to the wrong version of the docs. Please update the querystring toview=powershell-7.4to match this file's versioned folder.