Skip to content

Conversation

daxian-dbw
Copy link
Member

@daxian-dbw daxian-dbw commented Dec 2, 2021

PR Summary

Fix #3066

Skip the AST analysis when command-line input has any parsing errors in the default sensitive history scrubbing function.
When a command-line input matches sensitive pattern and has parsing error, we don't further analyze its AST because we cannot reliably do so with incorrect ASTs. In that case, we just consider it sensitive, given that it contains matches of our sensitive patterns.

PR Checklist

  • PR has a meaningful title
    • Use the present tense and imperative mood when describing your changes
  • Summarized changes
  • Make sure you've added one or more new tests
  • Make sure you've tested these changes in terminals that PowerShell is commonly used in (i.e. conhost.exe, Windows Terminal, Visual Studio Code Integrated Terminal, etc.)
  • User-facing changes
    • Not Applicable
    • OR
    • Documentation needed at PowerShell-Docs
      • Doc Issue filed:
Microsoft Reviewers: Open in CodeFlow

@daxian-dbw
Copy link
Member Author

@andschwa Please review when you have time, thanks!

@daxian-dbw daxian-dbw merged commit 835bfd2 into PowerShell:master Dec 3, 2021
@daxian-dbw daxian-dbw deleted the history branch December 3, 2021 00:24
@ghost
Copy link

ghost commented Jan 7, 2022

🎉 v2.2.0-beta5 has been released which incorporates this pull request. 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pwsh 7.2.0 only working with PSReadLine 2.2.0-beta3, not beta 4
2 participants