Skip to content

Keep Forge failed to load patterns on one line - #200

Merged
pavog merged 1 commit into
masterfrom
forge-failed-to-load-pattern-backtracking
Nov 13, 2026
Merged

pavog merged 1 commit into
masterfrom
forge-failed-to-load-pattern-backtracking

Conversation

@pavog

@pavog pavog commented Nov 13, 2026

Copy link
Copy Markdown
Member

ModFatalProblem (failed-to-load) and ClientOnlyModProblem matched the mod id with \(([^\)]+)\), which includes newlines, and the start with ^\s*, which also crosses lines.
So every "(" made the pattern scan the rest of the entry for the next ")", and on entries of about 1 MB both patterns hit the backtrack limit.

This PR keeps name and id on one line with ^\h* and [^\)\n]+.
The matches and groups on all test logs are identical.

Changes

  • keep the mod id on one line in ModFatalProblem and ClientOnlyModProblem
  • remove both from KNOWN_UNSAFE_PATTERNS

@pavog
pavog merged commit dc89382 into master Nov 13, 2026
3 checks passed
@pavog
pavog deleted the forge-failed-to-load-pattern-backtracking branch November 13, 2026 20:43
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.

1 participant