Backslashes are not escaped when running processes through Reaper

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

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
35/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
shell
Lĩnh vực
cli

Hướng nghiên cứu

Bắt đầu bằng cách tái hiện việc khởi chạy thông qua Reaper với /usr/bin/cat và các tùy chọn khởi chạy được liệt kê, sau đó kiểm tra lệnh kết quả bằng pgrep và ps. Theo dõi cách Reaper truyền các đối số của tùy chọn khởi chạy và đảm bảo các dấu gạch chéo ngược nguyên dạng được giữ lại; hoàn tất khi các đối số quan sát được khớp với lệnh mong đợi, bao gồm cả dấu gạch chéo ngược đơn và kép.

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

Mô tả

Your system information
  • Steam Version: 1733265492
  • Steam Runtime Version: 0.20241024.105847
  • Distribution (e.g. Ubuntu 18.04): Manjaro
  • Link to your full system information: ---
  • Have you checked for system updates?: No
  • What compatibility tool are you using?: None / Proton 9.0 (both tested, this is minimal repro)
  • What versions are listed in steamapps/common/SteamLinuxRuntime/VERSIONS.txt:
depot	0.20240806.0			# Overall version number
LD_LIBRARY_PATH	-	scout	-	# see ~/.steam/root/ubuntu12_32/steam-runtime/version.txt
scripts	0.20240806.0			# from steam-runtime-tools
  • What versions are listed in steamapps/common/SteamLinuxRuntime_soldier/VERSIONS.txt:
depot	0.20241118.108551			# Overall version number
pressure-vessel	0.20241118.0	scout		# pressure-vessel-bin.tar.gz
scripts	0.20241118.0			# from steam-runtime-tools
soldier	0.20241118.108551	soldier	0.20241118.108551	# soldier_platform_0.20241118.108551/
  • What versions are listed in steamapps/common/SteamLinuxRuntime_sniper/VERSIONS.txt:
depot	0.20241118.108552			# Overall version number
pressure-vessel	0.20241118.0	scout		# pressure-vessel-bin.tar.gz
scripts	0.20241118.0			# from steam-runtime-tools
sniper	0.20241118.108552	sniper	0.20241118.108552	# sniper_platform_0.20241118.108552/
Please describe your issue in as much detail as possible:

Launch Options should escape backslashes to pass them through properly. Mostly used for Wine/Proton apps when a file path needs to be specified.

Bash's printf "%q" would do, but it's not part of POSIX (man printf.1p). Does Steam care about POSIX shells?

PS: I hope this is in the correct repository

Steps for reproducing this issue:
  1. Add non-steam game: /usr/bin/cat
  2. Launch options (GNU cat) to make it stall but also showcase the args: -- /dev/zero --doubledash forward/slash back\slash double\\backslash
  3. Observe the args:
pgrep cat
# shows PID
ps -ewwo pid,etime,cmd $PID
  17962       01:50 /home/HOME/.local/share/Steam/ubuntu12_32/reaper SteamLaunch AppId=3378455283 -- /usr/bin/cat -- /dev/zero --doubledash forward/slash backslash double\backslash
  17963       01:49 /usr/bin/cat -- /dev/zero --doubledash forward/slash backslash double\backslash

Expected:

/usr/bin/cat -- /dev/zero --doubledash forward/slash back\slash double\\backslash

Actual:

/usr/bin/cat -- /dev/zero --doubledash forward/slash backslash double\backslash

Ngôn ngữ chính
Shell
Star
1.5k
Fork
98
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

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

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

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 ValveSoftware/steam-runtime

Tất cả issue của ValveSoftware/steam-runtime

Issue tương tự

Thêm issue về Shell/Bash

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.