Skip to content

DBG: Prompt Injection Necessary? #998

Open
@JustinGrote

Description

@JustinGrote

// Add the [DBG] prefix if we're stopped in the debugger and the prompt doesn't already have [DBG] in it
if (this.powerShellContext.IsDebuggerStopped && !promptString.Contains("[DBG]"))
{
promptString =
string.Format(
CultureInfo.InvariantCulture,
"[DBG]: {0}",
promptString);
}

Is this function really necessary? The prompt function already has this DBG: detection in it, and if someone has customized the prompt (as I have), it adds an extra DBG: where it is unwanted. Perhaps a toggle feature flag via the API can be made available?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions