microsoft / microsoft/vscode-cpptools

Text in "setupCommands" not properly escaped for XML

Aperta
#6,288 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

bug debugger
Lingua principale
TypeScript
Stelle
6.2k
Fork
1.7k
Merge medio
14h 46m
PR unite (30g)
61

Descrizione

Type: Debugger

Describe the bug

  • OS and Version: Windows 10 Pro (64-bit) 10.0.19041
  • Remote OS version: Ubuntu 16.04.7 LTS - Linux x64 4.19.128-microsoft-standard
  • VS Code Version: Code 1.50.0
  • C/C++ Extension Version: 1.0.1
  • Other extensions you installed (and if the issue persists after disabling them): -

Text in setupCommands in a launch configuration is not properly escaped for use in an internally generated XML.

To Reproduce

Debug the following launch configuration in launch.json:

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "setup command text bug",
            "type": "cppdbg",
            "request": "launch",
            "program": "/bin/cat",
            "args": [],  // unused for demonstration purposes
            "stopAtEntry": true,
            "cwd": "/bin",
            "environment": [],
            "externalConsole": false,
            "MIMode": "gdb",
            "logging": {
                "engineLogging": true
            },
            "setupCommands": [
                {
                    "text": "-exec-arguments </dev/null"
                }
            ]
        }
    ]
}

This gives the error:

Code_PwKgqFSC9x

It's possible that other similar settings like customLaunchSetupCommands exhibit the same issue.

Log:

1: (249) LaunchOptions<LocalLaunchOptions xmlns='http://schemas.microsoft.com/vstudio/MDDDebuggerOptions/2014'
1: (276) LaunchOptions  ExePath='/bin/cat'
1: (277) LaunchOptions  WorkingDirectory='/bin'
1: (277) LaunchOptions  ExeArguments=''
1: (277) LaunchOptions  MIMode='gdb'
1: (277) LaunchOptions  MIDebuggerPath=''
1: (277) LaunchOptions  WaitDynamicLibLoad='false'
1: (277) LaunchOptions>
1: (277) LaunchOptions    <SetupCommands>
1: (277) LaunchOptions        <Command IgnoreFailures='false' Description=''>-exec-arguments </dev/null</Command>
1: (277) LaunchOptions    </SetupCommands>
1: (277) LaunchOptions</LocalLaunchOptions>
1: (356) Send Event AD7MessageEvent

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia con la riproduzione usando launch.json e la gestione di setupCommands nell’estensione VS Code C/C++, quindi esegui il debugger con il comando mostrato che contiene �. Verifica che l’XML generato internamente sia ben formato e che il comando di configurazione venga passato senza causare l’errore di avvio segnalato.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
typescript, vscode
Ambito
devtools
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.