wesleysimplicio
364ddd45e8
fix(terminal): prevent safety filter false positives on keywords inside quoted strings
...
The _foreground_background_guidance() function matched background-wrapper
keywords (nohup/disown/setsid) anywhere in the command text, including
inside quoted strings, Python -c code, commit messages, and PR body text.
Two-layer fix:
1. Strip single-quoted, double-quoted, and backtick-quoted content before
pattern matching via _strip_quotes() helper.
2. Tighten the regex to only match keywords at command-start positions
(after ^, ;, &, &&, ||, or $() — not mid-argument.
Both layers are needed: quote stripping handles the common case of keywords
in string literals, and the position-aware regex handles unquoted cases
like 'export FOO=setsid' (word boundary match, wrong position).
Fixes #20064
2026-05-14 08:02:01 -07:00
..
2026-05-11 11:13:25 -07:00
2026-05-11 11:13:25 -07:00
2026-05-12 16:31:46 -07:00
2026-03-17 02:33:12 -07:00
2026-03-31 08:48:54 +09:00
2026-03-23 07:43:12 -07:00
2026-05-12 18:50:37 -07:00
2026-04-08 02:24:32 -07:00
2026-04-01 04:18:50 -07:00
2026-05-12 15:14:49 -07:00
2026-05-09 02:34:19 -07:00
2026-04-23 22:23:37 -07:00
2026-05-11 11:13:25 -07:00
2026-05-13 22:07:02 -07:00
2026-04-08 02:24:32 -07:00
2026-05-11 11:13:25 -07:00
2026-05-12 16:33:33 -07:00
2026-04-07 13:36:38 -07:00
2026-05-11 11:13:25 -07:00
2026-05-08 11:07:38 -07:00
2026-05-07 05:02:26 -07:00
2026-05-11 11:03:29 -07:00
2026-04-07 10:25:31 -07:00
2026-05-13 23:12:57 -07:00
2026-05-07 05:11:09 -07:00
2026-04-28 23:17:39 -07:00
2026-05-08 16:39:32 -07:00
2026-05-08 16:39:32 -07:00
2026-05-12 17:02:35 -07:00
2026-04-21 16:41:26 -07:00
2026-05-11 11:13:25 -07:00
2026-05-11 11:03:29 -07:00
2026-04-13 04:45:07 -07:00
2026-05-12 01:02:25 -07:00
2026-04-17 20:39:25 -07:00
2026-05-11 11:13:25 -07:00
2026-05-14 10:41:46 +05:30
2026-04-02 12:40:03 +11:00
2026-05-07 05:35:33 -07:00
2026-05-07 05:35:33 -07:00
2026-05-14 07:58:43 -07:00
2026-05-11 11:20:58 -07:00
2026-05-08 09:27:26 -07:00
2026-05-08 09:27:26 -07:00
2026-05-11 11:20:58 -07:00
2026-03-18 02:55:30 -07:00
2026-03-11 20:02:36 -07:00
2026-05-11 11:13:25 -07:00
2026-05-11 11:13:25 -07:00
2026-04-11 13:59:52 -07:00
2026-05-12 13:59:22 -04:00
2026-05-09 11:07:53 -07:00
2026-05-11 11:13:25 -07:00
2026-05-07 07:03:21 -07:00
2026-05-12 18:48:44 -07:00
2026-05-09 14:36:58 -07:00
2026-05-11 11:13:25 -07:00
2026-05-04 02:42:16 -07:00
2026-05-08 14:27:40 -07:00
2026-05-11 11:20:58 -07:00
2026-05-11 11:13:25 -07:00
2026-05-11 11:20:58 -07:00
2026-05-13 13:29:28 -07:00
2026-04-29 21:56:47 -07:00
2026-05-14 08:02:01 -07:00
2026-05-11 11:13:25 -07:00
2026-05-11 11:13:25 -07:00
2026-04-26 19:02:55 -07:00
2026-04-23 21:51:19 -07:00
2026-05-09 18:44:58 -07:00
2026-05-13 10:31:22 -07:00
2026-05-13 22:04:28 -07:00
2026-05-11 11:13:25 -07:00
2026-05-13 16:39:41 -07:00
2026-05-11 11:20:58 -07:00
2026-05-12 18:43:50 -07:00
2026-05-13 22:31:28 -07:00
2026-04-07 10:25:31 -07:00
2026-04-16 02:24:08 -07:00
2026-05-11 11:13:25 -07:00