`step ca renew` doesn't handle quoted arguments in `--exec` parameter

Aperta
#1,538 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
go
Ambito
cli

Direzione di ricerca

Start by locating the step ca renew implementation that parses and executes the --exec parameter; the issue does not name a file or test. Check how quoted arguments are currently split and look for relevant command-execution tests. Done means quoted arguments, including the curl -H parameters described here, are passed as intended, or the limitation is documented.

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

Descrizione

enhancement needs triage

Hello!

  • Vote on this issue by adding a 👍 reaction
  • If you want to implement this feature, comment to let us know (we'll work with you on design, scheduling, etc.)

Issue details

The implementation blindly splits at spaces regardless of whether they're quoted, so the command is executed differently than e.g., if it were passed as an argument to sh -c.

Why is this needed?

I ran into this issue when trying to use curl to execute a Caddy configuration reload; in this case, it breaks the -H parameters.

I'm calling it an enhancement but this ticket could also be a bug. There's an easy workaround (put the command in a script file) so documenting the limitation would also be an acceptable fix.

Lingua principale
Go
Stelle
4.3k
Fork
320
Merge medio
2g 3h
PR unite (30g)
11

Preparare l'ambiente

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.

Altre issue di smallstep/cli

Tutte le issue di smallstep/cli

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.