Ben Barclay
e4a1b35a39
fix(config): preserve original .env file mode instead of unconditionally tightening to 0600 ( #33699 )
...
`save_env_value()` captures the original .env file mode (e.g. 0640 for Docker
volume mounts) and restores it via `os.chmod` — but then unconditionally calls
`_secure_file(env_path)` on the next line, which re-tightens the mode to 0600
and defeats the entire preservation logic. The intent (preserve when
`original_mode` is captured, secure otherwise) was already in the code but
got short-circuited.
Move `_secure_file()` into the `else` branch so it only runs when no original
mode was captured — fresh `.env` files written for the first time still get
the 0600 hardening treatment, but operator-set modes survive subsequent writes.
Salvages #31518 by @blut-agent (config.py portion only). Their PR also bundled
unrelated lowercase-lookup changes in `hermes_cli/commands.py`; this salvage
takes only the focused config fix. The commands.py changes are reasonable on
their own merits but belong in a separate PR.
Co-authored-by: blut-agent <278569635+blut-agent@users.noreply.github.com>
2026-06-10 15:42:16 +10:00
..
2026-06-10 12:14:57 +10:00
2026-05-29 04:22:27 -07:00
2026-06-07 22:56:23 -07:00
2026-06-05 17:55:43 -07:00
2026-06-02 20:49:44 -05:00
2026-06-07 01:21:58 -07:00
2026-06-08 15:12:12 -07:00
2026-06-08 11:57:03 -07:00
2026-06-08 11:57:03 -07:00
2026-05-18 10:14:38 -07:00
2026-05-29 13:22:54 -07:00
2026-06-05 15:37:19 +10:00
2026-05-19 22:34:05 -07:00
2026-05-28 15:14:05 +10:00
2026-05-28 22:26:25 -07:00
2026-05-25 01:20:33 -07:00
2026-05-28 22:26:25 -07:00
2026-06-01 19:51:03 -07:00
2026-06-08 11:29:53 -07:00
2026-06-09 21:51:43 -07:00
2026-05-25 01:20:33 -07:00
2026-05-13 22:54:21 -07:00
2026-05-27 12:16:15 -07:00
2026-05-15 02:31:30 -07:00
2026-05-17 02:29:41 -07:00
2026-03-30 17:07:21 -07:00
2026-06-09 21:51:43 -07:00
2026-06-01 19:51:03 -07:00
2026-06-10 15:42:16 +10:00
2026-06-01 11:28:56 +10:00
2026-05-11 11:13:25 -07:00
2026-06-05 00:19:45 -07:00
2026-05-11 11:13:25 -07:00
2026-06-01 16:58:58 -07:00
2026-06-09 13:56:33 +10:00
2026-06-03 19:37:04 -07:00
2026-03-26 01:34:27 -07:00
2026-05-18 16:34:24 +05:30
2026-05-11 11:13:25 -07:00
2026-06-09 18:49:08 -05:00
2026-06-08 10:01:47 -07:00
2026-05-25 15:18:55 -07:00
2026-05-23 05:24:57 -07:00
2026-05-23 05:24:57 -07:00
2026-06-06 19:53:58 -07:00
2026-06-08 00:20:08 -07:00
2026-05-31 01:16:33 -07:00
2026-06-06 18:22:38 -07:00
2026-05-11 11:13:25 -07:00
2026-06-07 00:41:13 -07:00
2026-06-07 09:50:44 -07:00
2026-06-06 19:29:00 -07:00
2026-05-29 04:22:27 -07:00
2026-06-07 06:14:24 -07:00
2026-05-28 21:00:46 -07:00
2026-06-04 07:39:53 -07:00
2026-06-03 05:41:35 -07:00
2026-06-09 18:49:08 -05:00
2026-06-05 07:54:08 -05:00
2026-05-28 22:26:25 -07:00
2026-06-04 17:11:17 -07:00
2026-05-26 12:48:14 -07:00
2026-05-30 07:45:26 -07:00
2026-06-04 14:03:02 +10:00
2026-06-06 23:07:25 +05:30
2026-05-20 09:18:23 -07:00
2026-06-08 22:31:06 -07:00
2026-05-27 00:43:32 -07:00
2026-06-08 09:42:44 -07:00
2026-06-07 00:41:13 -07:00
2026-06-09 14:45:19 -07:00
2026-06-06 13:18:18 +05:30
2026-06-05 04:06:17 -07:00
2026-05-30 07:31:48 -07:00
2026-05-07 07:18:21 -07:00
2026-05-29 17:49:15 -07:00
2026-04-29 21:56:51 -07:00
2026-06-09 13:42:51 -04:00
2026-06-03 11:22:06 -07:00
2026-06-04 02:20:31 +05:30
2026-05-28 22:26:25 -07:00
2026-06-07 21:50:57 -07:00
2026-06-09 10:52:02 -05:00
2026-05-30 02:53:42 -07:00
2026-06-08 15:53:09 -07:00
2026-05-28 02:36:09 -07:00
2026-05-29 00:31:44 -07:00
2026-06-08 07:03:12 -07:00
2026-05-08 14:27:40 -07:00
2026-06-07 06:14:24 -07:00
2026-05-25 01:20:33 -07:00
2026-06-06 18:36:40 -07:00
2026-05-29 13:24:12 -07:00
2026-05-28 22:26:25 -07:00
2026-05-16 23:00:58 -05:00
2026-06-10 14:01:34 +10:00
2026-05-17 02:29:41 -07:00
2026-06-05 04:06:17 -07:00
2026-04-29 04:03:03 -07:00
2026-06-07 10:15:31 -07:00
2026-05-18 20:05:23 -07:00
2026-05-08 17:01:12 -07:00
2026-06-04 01:19:28 +05:30
2026-05-28 22:26:25 -07:00
2026-06-05 03:20:10 -07:00
2026-05-19 14:25:10 -07:00
2026-06-06 11:20:40 -06:00
2026-06-06 18:22:20 -07:00
2026-06-06 18:22:38 -07:00
2026-05-06 15:49:59 -07:00
2026-06-09 00:31:27 -07:00
2026-05-24 04:55:18 -07:00
2026-06-08 11:32:43 -07:00
2026-06-09 21:51:43 -07:00
2026-05-20 09:18:23 -07:00