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

Đang mở
#1,538 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
45/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
go
Lĩnh vực
cli

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Go
Star
4.3k
Fork
320
Merge trung bình
2 ngày 3 giờ
Pull request đã merge (30 ngày)
11

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của smallstep/cli

Tất cả issue của smallstep/cli

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.