shraga 0.1.28 → 0.1.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shraga",
3
- "version": "0.1.28",
3
+ "version": "0.1.29",
4
4
  "description": "The teammate you delegate coding to — a self-hostable, multi-user AI coding agent web UI (Claude Code, with a pluggable engine seam).",
5
5
  "type": "module",
6
6
  "main": "./src/index.ts",
@@ -7,3 +7,15 @@ const PLACEHOLDER = /^['"]?\$\{[A-Za-z0-9_]+\}['"]?$/;
7
7
  for (const [key, value] of Object.entries(process.env)) {
8
8
  if (typeof value === 'string' && PLACEHOLDER.test(value.trim())) delete process.env[key];
9
9
  }
10
+
11
+ // A PEM key stored UNQUOTED in an EnvironmentFile loses its backslashes — systemd does not process
12
+ // escapes there, so `KEY=-----BEGIN…\nMHc…` arrives as `-----BEGIN…nMHc…`: the `\n`s become stray `n`
13
+ // characters INSIDE the base64. The value still looks like a key, so it fails far away and much later
14
+ // (`NO_START_LINE` from OpenSSL, mid-job), and an inherited env beats any later `--env-file`. Warning
15
+ // at boot turns a day-long silent data gap into a line in the log. Warn, never delete — a broken
16
+ // credential is still better than a missing one for diagnosing.
17
+ for (const [key, value] of Object.entries(process.env)) {
18
+ if (typeof value !== 'string' || !value.includes('-----BEGIN')) continue;
19
+ if (value.includes('\n') || value.includes('\\n')) continue; // real or escaped newlines: fine
20
+ console.warn(`[env] ⚠️ ${key} looks like a PEM key with its newlines eaten (no \\n at all) — quote it in the env file ('single quotes'), else it will fail at use time with NO_START_LINE.`);
21
+ }