PowerShell: Corrupted text provided by command is automatically invoked by PowerShell during an interactive session.
Prerequisites
- Write a descriptive title.
- Make sure you are able to reproduce it on the latest released version
- Search the existing issues.
- Refer to the FAQ.
- Refer to Differences between Windows PowerShell 5.1 and PowerShell.
Steps to reproduce
To reproduce this problem:
- Download this; and:
- “
Set-Location
” to where the file is stored. - Invoke “
cat '1654094598.txt'
”.
Expected behaviour
The corrupted file should not be passed to the interpreter.
Actual behaviour
Corrupted text is provided to the interpreter when I observe the output of invocation of “script -a
”, which appears to be corrupt, via “cat
”.
Error details
PS /> Get-Error
PS />
Weirdly, nothing erroneous appears to have been recorded.
Environment data
PS /> $PSVersionTable
Name Value
---- -----
PSVersion 7.3.0-preview.4
PSEdition Core
GitCommitId 7.3.0-preview.4
OS Linux 5.19.0-0.rc0.20220526gitbabf0bb978e3.4.fc37.x86_64 #1 SMP PREEMPT_DYNAMIC Thu May 26 16:02:31 UTC 2022
Platform Unix
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
PS />
Visuals
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 15 (6 by maintainers)
Thanks, marking as by design.
No, dumping file contents to the terminal, even when it may contain sensitive information, is not a security issue.
Once you uploaded the file, it will be visible to everyone. Please scrub your file and try narrow down the needed content for reproducing the issue. The simpler the repro steps are, the easier for investigation.
Please provide steps that can reproduce the issue you observed.
The transcript log file may provide additional information, but it’s not repro steps. For example, I cannot find
script -a
in the log file. If all you did wascat $ENV:HOME/typescript
, then the$ENV:HOME/typescript
file should be provided to help reproduce the issue.