Skip to content

Filesystem Provider, UNC Paths & Double Backslash #13633

Closed

Description

Steps to reproduce

Run Remove-Item with a UNC path that contains a doubled backslash before the last item and including -WhatIf.
After confirming that you want to delete multiple items even though you didn't specify recurse, check the path it would have deleted.

Remove-Item \\localhost\C$\temp\\ADMF -WhatIf

Expected behavior

What if: Performing the operation "Remove Directory" on target "\\localhost\C$\temp\ADMF"

Actual behavior

What if: Performing the operation "Remove Directory" on target "\\localhost\C$\temp\"

Environment data

Name                           Value
----                           -----
PSVersion                      7.1.0-preview.6
PSEdition                      Core
GitCommitId                    7.1.0-preview.6
OS                             Microsoft Windows 10.0.18363
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Activity

  1. added
    WG-Engine-Providersbuilt-in PowerShell providers such as FileSystem, Certificates, Registry, etc.
    on Sep 15, 2020
  2. rjmholt commented on Sep 16, 2020

    @rjmholt
    Collaborator

    We should consider fixing this for RC.1

  3. added
    Issue-Enhancementthe issue is more of a feature request than a bug
    and removed
    Issue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get a
    on Oct 13, 2020
  4. TravisEz13 commented on Oct 13, 2020

    @TravisEz13
    Member

    Calling this an enhancement while we check if this is a regression.
    UPDATE:
    It does repro on 7.0 but does not in 5.1. This is not a regression. We won't block 7.1 RTM for this.

  5. jjolidon commented on Mar 3, 2022

    @jjolidon

    Just to confirm it is still biting on 7.2.1.

  6. ajansveld commented on Oct 28, 2022

    @ajansveld

    Why is this considered an "enhancement"? We just had our first incident because of this destructive bug, I feel we should be much louder about this.

    Is this being looked at for 7.3?

  7. Tadas commented on Nov 2, 2022

    @Tadas
    Contributor

    Looks like this has been fixed with #15873

  8. iSazonov commented on Nov 3, 2022

    @iSazonov
    Collaborator
  9. ajansveld commented on Nov 3, 2022

    @ajansveld

    What is the threshold for backporting the fix to 7.2 (LTS-current), considering it is supported for another 2 years?

  10. iSazonov commented on Jan 13, 2023

    @iSazonov
    Collaborator

    ajansveld Only security fixes are backported. Also regressions from previous version.

  11. added and removed
    Needs-TriageThe issue is new and needs to be triaged by a work group.
    on Jan 17, 2023
  12. ghost closed this as completedon Jan 19, 2023
  13. SteveL-MSFT commented on Jan 23, 2023

    @SteveL-MSFT
    Member

    Since this is a regression from 5.1 and hitting customers, we should consider backport to 7.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-Enhancementthe issue is more of a feature request than a bugResolution-FixedThe issue is fixed.WG-Engine-Providersbuilt-in PowerShell providers such as FileSystem, Certificates, Registry, etc.

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions