Ben Barclay
15813336cc
fix(config): preserve original .env file mode in remove_env_value too ( #43349 )
...
#33699 fixed save_env_value so an operator-set .env mode (e.g. 0640 on a
Docker bind-mount) survives a config write instead of being re-tightened
to 0600 by the unconditional _secure_file() call. The sibling
remove_env_value() had the identical bug: it restores original_mode and
then unconditionally called _secure_file(env_path), clobbering the mode
back to 0600 on every `hermes config remove KEY`.
Apply the same fix: move _secure_file() into the else branch so it only
runs when no original mode was captured (a freshly created .env still
gets 0600 hardening; existing operator-set modes survive).
Added test_remove_env_value_preserves_existing_file_mode_on_posix, which
fails on the unfixed remove path (expected 0o640, got 0o600) and passes
with the fix.
2026-06-10 19:53:07 +10:00
..
2026-06-07 22:22:21 -07:00
2026-06-10 00:24:06 -07:00
2026-06-09 22:41:04 -07:00
2026-06-10 08:27:24 +05:30
2026-06-10 14:01:34 +10:00
2026-05-28 22:26:25 -07:00
2026-06-02 12:37:40 -04:00
2026-06-10 00:46:00 -07:00
2026-06-10 19:53:07 +10:00
2026-06-08 09:35:22 -07:00
2026-06-06 11:46:24 -07:00
2026-06-04 17:40:33 -07:00
2026-06-10 10:49:36 +05:30
2026-06-10 15:03:01 +05:30
2026-06-09 23:22:10 -07:00
2026-06-08 15:21:28 -07:00
2026-06-05 13:30:02 +10:00
2026-05-28 22:26:25 -07:00
2026-06-10 19:23:06 +10:00
2026-06-09 19:01:00 +00:00
2026-06-01 19:52:28 -07:00
2026-06-01 19:51:03 -07:00
2026-05-28 22:26:25 -07:00
2026-06-06 18:33:44 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-06-08 10:02:05 -07:00
2026-06-03 07:32:00 +07:00
2026-06-10 15:32:34 +10:00
2026-06-01 16:06:44 +10:00
2026-06-01 13:32:55 +10:00
2026-06-05 02:54:34 -07:00
2026-05-25 15:18:55 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-06-08 06:32:42 -07:00
2026-05-28 22:26:25 -07:00
2026-06-03 19:37:29 -07:00
2026-06-06 19:57:44 -07:00
2026-05-28 21:40:39 -07:00
2026-05-27 14:31:55 -07:00
2026-06-07 02:41:01 -07:00
2026-06-08 09:35:22 -07:00
2026-05-29 22:29:48 -07:00
2026-05-27 10:49:33 -07:00
2026-06-01 20:13:42 -07:00
2026-06-08 02:18:21 -07:00
2026-05-27 13:55:51 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-06-09 23:22:10 -07:00
2026-05-28 22:26:25 -07:00
2026-06-04 18:04:47 -07:00
2026-06-03 11:22:06 -07:00
2026-05-28 22:26:25 -07:00
2026-06-09 03:17:12 -07:00
2026-06-09 14:03:20 -04:00
2026-05-28 22:26:25 -07:00
2026-06-08 09:35:22 -07:00
2026-05-28 22:26:25 -07:00
2026-06-08 12:11:54 -07:00
2026-06-09 21:39:09 -07:00
2026-06-08 07:03:12 -07:00
2026-06-09 18:49:08 -05:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-06-07 05:01:27 -07:00
2026-06-03 06:36:46 -07:00
2026-06-10 00:24:06 -07:00
2026-06-08 10:02:05 -07:00
2026-06-08 10:02:05 -07:00
2026-06-03 12:00:27 -07:00
2026-05-28 22:26:25 -07:00
2026-06-09 03:17:00 -07:00
2026-05-28 22:26:25 -07:00
2026-06-07 17:49:38 -07:00