Skip to content

any command with 'secret' doesnt get saved in history, even though no secrets exposed. #5108

@CyberAttackr

Description

@CyberAttackr

ran a command with 'secrets' and found that it doesnt get stored in history.

what idiot or bot thought it would be a good idea to do this stupid shit? it wasnt a problem before. imagine all the people's
time youve wasted bc they're left guessing why the fuck their command isnt in the history, as if they're supposed to just know.

&& (string.Equals(arg2, "secrets", StringComparison.OrdinalIgnoreCase) || string.Equals(arg2, "secret", StringComparison.OrdinalIgnoreCase));

Prerequisites

  • Write a descriptive title.
  • Make sure you are able to repro it on the latest released version
  • Search the existing issues, especially the pinned issues.

Exception report

Screenshot

N/A

Environment data

PS Version: 7.4.13

Steps to reproduce

run echo 'secret' and close the tab and start new and hit up arrow or look at ConsoleHost_history its not there, but not echo 'secre'

Expected behavior

command should be in history. there's no fucking secret in the command, just the string.

Actual behavior

not in history

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs-Triage 🔍It's a new issue that core contributor team needs to triage.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions