You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(install): pass auth options (CA_FILE, REJECT_UNAUTHORIZED) through to systemd/launchd units (#189)
Adds CACHE_FIX_PROXY_CA_FILE and CACHE_FIX_PROXY_REJECT_UNAUTHORIZED to the rendered systemd/launchd unit envs so corp-proxy / custom-CA setups work after install-service. Hardens systemdEscape for % (specifier expansion) and \\ (C-string unescape), and xmlEscape for plist entities. Regression tests cover both escape paths empirically against systemd-analyze + plistlib round-trip.
Co-authored-by: Aleksandr Usenko <nisqatsi@users.noreply.github.com>
Reviewed: PR #189 at `8159303bf58045561f2d6831736b2efee5bf632c`
5
+
Round: 4
6
+
Label applied: approved-by-codex-agent
7
+
8
+
## What Is Correct
9
+
10
+
`systemdEscape()` now closes the remaining round-3 gap in the helper itself. It escapes `%` before entering the quoting branch, and the quote trigger now includes bare backslashes, so a value containing `\` is forced down the quote-and-escape path instead of being emitted raw. Confirmed in `proxy/helpers.mjs:17-21`.
11
+
12
+
The new helper-level regression tests cover the right behaviors: bare `%`, bare `\`, a combined `%`/space/`\`/`"` case, and an explicit ordering proof that `%` escaping happens before quote-wrapping. Confirmed in `test/proxy-helpers.test.mjs:36-83`.
13
+
14
+
The renderer-level tests pin the rendered `Environment=` lines for the two concrete PR #189 regressions: percent-encoded upstream URLs and backslashes in CA-file paths. Confirmed in `test/install-service.test.mjs:93-125`.
15
+
16
+
I also re-ran the empirical checks against HEAD. A helper-rendered systemd unit passed `systemd-analyze verify`, and a live `systemctl --user` oneshot unit received:
For control, the raw unescaped unit still reproduced the old failures: the upstream var was dropped with `Failed to resolve specifiers ... Invalid slot`, and the CA path arrived as `/path/with<0x08>ackslash.pem`.
Approve and merge once the PR label state is updated.
40
+
41
+
## Bottom Line
42
+
43
+
The remaining round-3 systemd escaping gap is closed at `8159303`. The helper logic is now correct for `%` and `\`, the new regression tests cover the previously missing cases, and the live user-manager repro matches the intended behavior. This is ready for approval.
0 commit comments