Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: PowerShell/PowerShell
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v7.4.18
Choose a base ref
...
head repository: PowerShell/PowerShell
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v7.4.19
Choose a head ref
  • 15 commits
  • 30 files changed
  • 9 contributors

Commits on Aug 6, 2026

  1. [release/v7.4.19] Fix the dot-sourcing behavior of pwsh -file for a…

    …dvanced-function scripts (#27760)
    
    Co-authored-by: Dongbo Wang <dongbow@microsoft.com>
    SeeminglyScience and daxian-dbw authored Aug 6, 2026
    Configuration menu
    Copy the full SHA
    6aa3700 View commit details
    Browse the repository at this point in the history

Commits on Aug 10, 2026

  1. [release/v7.4.19] Update branch for release (#27780)

    Co-authored-by: PowerShell GitHub Bot <pwshbot@microsoft.com>
    powershell-pr-automation[bot] and pwshBot authored Aug 10, 2026
    Configuration menu
    Copy the full SHA
    72b9f82 View commit details
    Browse the repository at this point in the history
  2. [release/v7.4.19] Fix TimeZone test with duplicate names (#27804)

    Co-authored-by: Kirtikumar Anandrao Ramchandani <33368817+KirtiRamchandani@users.noreply.github.com>
    jshigetomi and KirtiRamchandani authored Aug 10, 2026
    Configuration menu
    Copy the full SHA
    b3d4071 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    8096926 View commit details
    Browse the repository at this point in the history
  4. Merged PR 41073: [release/v7.4.19] Add the xsd validation back for CI…

    …M cmdlets
    
    <!-- Anything that looks like this is a comment and can't be seen after the Pull Request is created. -->
    
    ### PR Summary
    
    Add the xsd validation back for CIM cmdlets for PowerShell v7.
    
    1. Instead of baking the huge `.xsd` file in a `.resx` resource file (which is what PS 5.1 does and depends on `System.Windows.Forms`), it's better to directly embed the `.xsd` file in the assembly as resource.
    2. Refactored the static constructor of `ScriptWriter` to enable `DtdProcessing.Parse` for PowerShell 7.
    
    ----
    #### AI description  (iteration 1)
    #### PR Classification
    This PR fixes a security vulnerability by re-enabling XSD validation for CIM cmdlets to prevent injection attacks in CDXML files.
    
    #### PR Summary
    Restores XSD schema validation for CIM cmdletization that was previously disabled in CoreCLR, addressing a security issue where malicious code could be injected through invalid CDXML files. The XSD schema file is now embedded as a manifest resource and validation is enforced across all platforms.
    
    - `ScriptWriter.cs`: Re-enabled XSD validation for all platforms (removed CORECLR conditional compilation), refactored XML reader settings initialization, and embedded XSD schema loaded from manifest resources
    - `Cdxml.Tests.ps1` and `invalid_verb.cdxml`: Added test case to verify that CDXML files with injection attempts in the Verb attribute are properly blocked by validation
    - `System.Management.Automation.csproj`: Added `cmdlets-over-objects.xsd` as an embedded resource to enable schema validation
    <!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot -->
    Patrick Meinecke authored and daxian-dbw committed Aug 10, 2026
    Configuration menu
    Copy the full SHA
    98400b8 View commit details
    Browse the repository at this point in the history

Commits on Aug 11, 2026

  1. Merged PR 41092: Merged PR 41087: Import LINQ for RunspaceConnectionI…

    …nfo (#173)
    
    Merged PR 41087: Import LINQ for RunspaceConnectionInfo (#173)
    
    Import LINQ for RunspaceConnectionInfo (#173)
    
    ----
    #### AI description  (iteration 1)
    #### PR Classification
    Code cleanup to add a missing namespace import for LINQ functionality.
    
    #### PR Summary
    This pull request adds the `System.Linq` namespace import to the `RunspaceConnectionInfo.cs` file to resolve a missing dependency.
    
    - `RunspaceConnectionInfo.cs`: Added `using System.Linq;` directive to import LINQ namespace
    <!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot -->
    
    ----
    #### AI description  (iteration 1)
    #### PR Classification
    Code cleanup: Adding a missing namespace import to resolve LINQ dependencies in the RunspaceConnectionInfo class.
    
    #### PR Summary
    This pull request adds the `System.Linq` namespace import to the RunspaceConnectionInfo.cs file to support LINQ operations that are likely already being used in the code but were previously missing the explicit import statement.
    
    - `RunspaceConnectionInfo.cs`: Added `using System.Linq;` directive to the namespace imports
    
    Related work items: #164495
    Justin Chung
    Justin Chung committed Aug 11, 2026
    Configuration menu
    Copy the full SHA
    274910e View commit details
    Browse the repository at this point in the history
  2. Merged PR 41037: [release/v7.4.19] Fix PowerShell Remoting Argument G…

    …eneration
    
    <!-- Anything that looks like this is a comment and can't be seen after the Pull Request is created. -->
    
    # PR Summary
    - add quoting (& escaping) around all applicable Windows arguments for PowerShell Remoting via SSH by appending CLI args to list individually (i.e. `""-l"" ""username""` instead of `""-l username""`) then checking each arg for special chars that require quoting
    - add corresponding Pester tests
    - refactor remoting Pester tests to also run on Windows with local user name
    <!-- Summarize your PR between here and the checklist. -->
    
    ## PR Context
    - fix for https://dev.azure.com/msazure/One/_workitems/edit/37632457
    <!-- Provide a little reasoning as to why this Pull Request helps and why you have opened it. -->
    
    ## PR Checklist
    
    - [X] [PR has a meaningful title](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---submission)
      - Use the present tense and imperative mood when describing your changes
    - [X] [Summarized changes](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---submission)
    - [X] [Make sure all `.h`, `.cpp`, `.cs`, `.ps1` and `.psm1` files have the correct copyright header](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---submission)
    - [X] This PR is ready to merge. If this PR is a work in progress, please open this as a [Draft Pull Request and mark it as Ready to Review when it is ready to merge](https://docs.github.com/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests#draft-pull-requests).
    - **[Breaking changes](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#making-breaking-changes)**
      - [X] None
      - **OR**
      - [ ] [Experimental feature(s) needed](https://github.com/MicrosoftDocs/PowerShell-Docs/blob/main/reference/7.5/Microsoft.PowerShell.Core/About/about_Experimental_Features.md)
        - [ ] Experimental feature name(s): <!-- Experimental feature name(s) here -->
    - **User-facing changes**
      - [X] Not Applicable
      - **OR**
      - [ ] [Documentation needed](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---submission)
        - [ ] Issue filed: <!-- Number/link of that issue here -->
    - **Testing - New and feature**
      - [ ] N/A or can only be tested interactively
      - **OR**
      - [X] [Make sure you've added a new test if existing tests do not effectively test the code changed](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#before-submitting)
    
    ----
    #### AI description  (iteration 1)
    #### PR Classification
    Bug fix to address security vulnerabilities in PowerShell SSH remoting argument generation on Windows.
    
    #### PR Summary
    This PR fixes improper command-line argument escaping in PowerShell SSH remoting that could allow argument injection attacks. The fix implements proper Windows argument quoting and separates SSH parameters to prevent maliciou...
    Patrick Meinecke Justin Chung
    Patrick Meinecke authored and Justin Chung committed Aug 11, 2026
    Configuration menu
    Copy the full SHA
    4527dd2 View commit details
    Browse the repository at this point in the history
  3. Merged PR 41039: [release/v7.4.19] Fix potential path traversal with …

    …`Invoke-WebRequest` and `-OutFile`
    
    <!-- Anything that looks like this is a comment and can't be seen after the Pull Request is created. -->
    
    # PR Summary
    
    When `Invoke-WebRequest -OutFile` specifies a directory, a file name will be determined by the last URI segment. If redirected to a file with encoded slash characters, `Invoke-WebRequest` will decode the characters and call `Path.Combine` without any validation.
    
    This change simply calls `Path.GetFileName` after decoding to get strip away any leading path elements.
    
    <!-- Summarize your PR between here and the checklist. -->
    
    ## PR Context
    
    <!-- Provide a little reasoning as to why this Pull Request helps and why you have opened it. -->
    
    ## PR Checklist
    
    - [x] [PR has a meaningful title](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---submission)
      - Use the present tense and imperative mood when describing your changes
    - [x] [Summarized changes](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---submission)
    - [x] [Make sure all `.h`, `.cpp`, `.cs`, `.ps1` and `.psm1` files have the correct copyright header](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---submission)
    - [x] This PR is ready to merge. If this PR is a work in progress, please open this as a [Draft Pull Request and mark it as Ready to Review when it is ready to merge](https://docs.github.com/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests#draft-pull-requests).
    - **[Breaking changes](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#making-breaking-changes)**
      - [x] None
      - **OR**
      - [ ] [Experimental feature(s) needed](https://github.com/MicrosoftDocs/PowerShell-Docs/blob/main/reference/7.5/Microsoft.PowerShell.Core/About/about_Experimental_Features.md)
        - [ ] Experimental feature name(s): <!-- Experimental feature name(s) here -->
    - **User-facing changes**
      - [x] Not Applicable
      - **OR**
      - [ ] [Documentation needed](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---submission)
        - [ ] Issue filed: <!-- Number/link of that issue here -->
    - **Testing - New and feature**
      - [x] N/A or can only be tested interactively
      - **OR**
      - [ ] [Make sure you've added a new test if existing tests do not effectively test the code changed](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#before-submitting)
    
    ----
    #### AI description  (iteration 1)
    #### PR Classification
    Security bug fix to prevent path traversal vulnerability in the `Invoke-WebRequest` cmdlet when using the `-OutFile` parameter.
    
    #### PR Summary
    This PR addresses a path traversal security vulnerability by sanitizing the filename extracted from URL segments before using it in file path operations. The fix ensures that malicious URLs containing path traversal sequences (e.g., "../") cannot escape the intended outp...
    Patrick Meinecke Justin Chung
    Patrick Meinecke authored and Justin Chung committed Aug 11, 2026
    Configuration menu
    Copy the full SHA
    da68ad0 View commit details
    Browse the repository at this point in the history
  4. Merged PR 41040: [release/v7.4.19] Strip authorization on redirect if…

    … `-PreserveAuthorizationOnRedirect` is not specified
    
    <!-- Anything that looks like this is a comment and can't be seen after the Pull Request is created. -->
    
    # PR Summary
    
    Web commands currently preserve `Authorization` headers when either the `FollowRelLinks` parameter or the `PreserveHttpMethodOnRedirect` parameter is specified. This should only occur when `PreserveAuthorizationOnRedirect` is specified. This change fixes that.
    
    <!-- Summarize your PR between here and the checklist. -->
    
    ## PR Context
    
    <!-- Provide a little reasoning as to why this Pull Request helps and why you have opened it. -->
    
    ## PR Checklist
    
    - [x] [PR has a meaningful title](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---submission)
      - Use the present tense and imperative mood when describing your changes
    - [x] [Summarized changes](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---submission)
    - [x] [Make sure all `.h`, `.cpp`, `.cs`, `.ps1` and `.psm1` files have the correct copyright header](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---submission)
    - [x] This PR is ready to merge. If this PR is a work in progress, please open this as a [Draft Pull Request and mark it as Ready to Review when it is ready to merge](https://docs.github.com/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests#draft-pull-requests).
    - **[Breaking changes](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#making-breaking-changes)**
      - [ ] None
      - **OR**
      - [x] This is a breaking change, but cannot be made experimental.
      - [ ] [Experimental feature(s) needed](https://github.com/MicrosoftDocs/PowerShell-Docs/blob/main/reference/7.5/Microsoft.PowerShell.Core/About/about_Experimental_Features.md)
        - [ ] Experimental feature name(s): <!-- Experimental feature name(s) here -->
    - **User-facing changes**
      - [ ] Not Applicable
      - **OR**
      - [x] [Documentation needed](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---submission)
        - [ ] Issue filed: <!-- Number/link of that issue here -->
    - **Testing - New and feature**
      - [ ] N/A or can only be tested interactively
      - **OR**
      - [x] [Make sure you've added a new test if existing tests do not effectively test the code changed](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#before-submitting)
    
    ----
    #### AI description  (iteration 1)
    #### PR Classification
    Security bug fix to strip authorization headers on HTTP redirects by default, with an option to preserve them when explicitly specified.
    
    #### PR Summary
    This PR fixes a security issue where authorization headers were incorrectly preserved during HTTP redirects. By default, authorization headers are now stripped on redirects unless the `-PreserveAuthorizationOnRedirect` flag is explicitly set.
    
    - `WebRequestPSCmdlet.Common.cs`: Added logic to remove a...
    Patrick Meinecke Justin Chung
    Patrick Meinecke authored and Justin Chung committed Aug 11, 2026
    Configuration menu
    Copy the full SHA
    d00974d View commit details
    Browse the repository at this point in the history
  5. Merged PR 41038: [release/v7.4.19] Check the total object size to be …

    …received once a frame header is available
    
    ### PR Summary
    
    This is the fix for [IcM 31000000556952](https://portal.microsofticm.com/imp/v5/incidents/details/31000000556952/summary)
    
    Check the total object size to be received once a frame header is available, instead of waiting for the frame blob data to be fully received.
    
    The fix is verified using the `test-psrp-local-reflection-fixed.ps1` script and this exception gets thrown as expected:
    
    > WARNING:   Chunk 0 threw: Exception calling ""Invoke"" with ""2"" argument(s): ""The current deserialized object size of the data received from the remote client computer exceeded the allowed maximum object size. The current deserialized object size is 2147483413. The allowed maximum object size is 10485760.""
    
    ```none
    PS C:\> C:\Users\dongbow\Downloads\test-psrp-local-reflection-fixed.ps1
    [1/4] Resolving required types...
      Fragmentor:              True
      ReceiveDataCollection:   True
      CryptoHelper:            System.Management.Automation.Internal.PSRemotingCryptoHelper
    [2/4] Constructing Fragmentor instance...
      Available Fragmentor constructors:
        (Int32, PSRemotingCryptoHelper)
      Created Fragmentor via (int, null) ctor
    [3/4] Constructing ReceiveDataCollection instance...
      Available ReceiveDataCollection constructors:
        (Fragmentor, Boolean)
      Created ReceiveDataCollection via (Fragmentor, bool) ctor
      MaximumReceivedObjectSize set to 10485760
    [4/4] Sending forged header and streaming chunks...
      Forged header processed
    WARNING:   Chunk 0 threw: Exception calling ""Invoke"" with ""2"" argument(s): ""The current deserialized object size of the data received from the remote client computer exceeded the allowed maximum object size. The current deserialized object size is 2147483413. The allowed maximum object size is 10485760.""
    
    === Per-chunk buffer growth ===
    
    === Summary ===
    
    MaximumReceivedObjectSize  : 10485760
    PendingBufferBytes         : 262165
    PendingBufferMB            : 0.25
    DeclaredFragmentTotalBytes : 2147483413
    ManagedHeapBefore          : 7477568
    ManagedHeapAfter           : 8363808
    ManagedHeapDeltaMB         : 0.85
    ChunksProcessed            : 0
    MaxBufferSizeSeen          :
    
    === Verdict ===
    ```
    
    ----
    #### AI description  (iteration 1)
    #### PR Classification
    Bug fix to prevent premature updating of received object size tracking in PowerShell remoting, ensuring size validation occurs before fragment processing.
    
    #### PR Summary
    This change fixes a timing issue in the remoting layer where the total received object size was being updated before verifying that the complete fragment data had actually been received. The fix moves the size limit check to occur immediately after parsing the frame header, and only updates the running total after confirming the full fragment is available.
    
    - `PriorityCollection.cs`: Moved the size limit validation logic to execute before checking if sufficient data is available in the pending stream
    - `PriorityCollection.cs`: Introduced `totalSizeToBeReceived` variable to track prospective size without upd...
    Patrick Meinecke Justin Chung
    Patrick Meinecke authored and Justin Chung committed Aug 11, 2026
    Configuration menu
    Copy the full SHA
    5f8c899 View commit details
    Browse the repository at this point in the history
  6. Merged PR 41041: [release/v7.4.19] Escape single quotes in path argum…

    …ent in ModuleCmdletBase.SyncCurrentLocationHandler
    
    <!-- Anything that looks like this is a comment and can't be seen after the Pull Request is created. -->
    This pull request improves the way paths are handled when synchronizing the current location in modulesby ensuring that paths containing single quotes are properly escaped before being used by Windows compat.
    
    **Path handling improvements:**
    
    * In `SyncCurrentLocationHandler`, the `args.NewPath.Path` value is now passed through `CodeGeneration.EscapeSingleQuotedStringContent` before being inserted into the `Set-Location` command, ensuring single quotes in paths are safely escaped.
    
    # PR Summary
    
    <!-- Summarize your PR between here and the checklist. -->
    
    ## PR Context
    
    <!-- Provide a little reasoning as to why this Pull Request helps and why you have opened it. -->
    
    ## PR Checklist
    
    - [ ] [PR has a meaningful title](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---submission)
      - Use the present tense and imperative mood when describing your changes
    - [ ] [Summarized changes](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---submission)
    - [ ] [Make sure all `.h`, `.cpp`, `.cs`, `.ps1` and `.psm1` files have the correct copyright header](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---submission)
    - [ ] This PR is ready to merge. If this PR is a work in progress, please open this as a [Draft Pull Request and mark it as Ready to Review when it is ready to merge](https://docs.github.com/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests#draft-pull-requests).
    - **[Breaking changes](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#making-breaking-changes)**
      - [ ] None
      - **OR**
      - [ ] [Experimental feature(s) needed](https://github.com/MicrosoftDocs/PowerShell-Docs/blob/main/reference/7.5/Microsoft.PowerShell.Core/About/about_Experimental_Features.md)
        - [ ] Experimental feature name(s): <!-- Experimental feature name(s) here -->
    - **User-facing changes**
      - [ ] Not Applicable
      - **OR**
      - [ ] [Documentation needed](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---submission)
        - [ ] Issue filed: <!-- Number/link of that issue here -->
    - **Testing - New and feature**
      - [ ] N/A or can only be tested interactively
      - **OR**
      - [ ] [Make sure you've added a new test if existing tests do not effectively test the code changed](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#before-submitting)
    
    ----
    #### AI description  (iteration 1)
    #### PR Classification
    Bug fix to properly escape single quotes in file paths when synchronizing locations in PowerShell module cmdlets.
    
    #### PR Summary
    This PR fixes a security and functionality issue where single quotes in file paths were not properly escaped when invoking `Set-Location` commands in compatibility sess...
    Patrick Meinecke Justin Chung
    Patrick Meinecke authored and Justin Chung committed Aug 11, 2026
    Configuration menu
    Copy the full SHA
    adddd1b View commit details
    Browse the repository at this point in the history
  7. [release/v7.4.19] Update branch for release (#27830)

    Co-authored-by: Justin Chung <chungjustin@microsoft.com>
    jshigetomi and Justin Chung authored Aug 11, 2026
    Configuration menu
    Copy the full SHA
    850c54b View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    863883e View commit details
    Browse the repository at this point in the history

Commits on Aug 12, 2026

  1. Update 7.4 changelog for v7.4.19 (#27833)

    Co-authored-by: PwshBot <pwshbot@microsoft.com>
    Co-authored-by: Justin Chung <chungjustin@microsoft.com>
    3 people authored Aug 12, 2026
    Configuration menu
    Copy the full SHA
    ad8013b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b3d5b85 View commit details
    Browse the repository at this point in the history
Loading