Skip to content

fix: escape parens and braces in fork bomb regex pattern - #1397

Merged
teknium1 merged 1 commit into
mainfrom
hermes/hermes-629f8bde
Mar 15, 2026
Merged

fix: escape parens and braces in fork bomb regex pattern#1397
teknium1 merged 1 commit into
mainfrom
hermes/hermes-629f8bde

Conversation

@teknium1

Copy link
Copy Markdown
Contributor

Summary

Contributor credit

Salvages PR #1078 by cherry-picking the contributor commit onto current main with authorship preserved.

Test plan

  • python -m pytest tests/tools/test_approval.py -n0 -q

Notes

  • I also attempted the full suite locally. It hit an unrelated existing failure in tests/test_api_key_providers.py::TestResolveProvider::test_auto_detects_minimax_cn_key, outside the touched files for this PR.

The fork bomb regex used `()` (empty capture group) and unescaped `{}`
instead of literal `\(\)` and `\{\}`. This meant the classic fork bomb
`:(){ :|:& };:` was never detected. Also added `\s*` between `:` and
`&` and between `;` and trailing `:` to catch whitespace variants.
@teknium1
teknium1 merged commit 62f1c2b into main Mar 15, 2026
1 check failed
angelburgosrosado pushed a commit to angelburgosrosado/hermes-agent that referenced this pull request Apr 27, 2026
…629f8bde

fix: escape parens and braces in fork bomb regex pattern
02356abc pushed a commit to 02356abc/hermes-agent that referenced this pull request May 14, 2026
…629f8bde

fix: escape parens and braces in fork bomb regex pattern
waefrebeorn pushed a commit to waefrebeorn/slermes that referenced this pull request Jul 2, 2026
…629f8bde

fix: escape parens and braces in fork bomb regex pattern
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants