Skip to content

Potential fix for code scanning alert no. 89: Inefficient regular expression - #57

Merged
mokesano merged 1 commit into
mainfrom
alert-autofix-89
Jun 2, 2026
Merged

Potential fix for code scanning alert no. 89: Inefficient regular expression#57
mokesano merged 1 commit into
mainfrom
alert-autofix-89

Conversation

@mokesano

@mokesano mokesano commented Jun 2, 2026

Copy link
Copy Markdown
Owner

Potential fix for https://github.com/mokesano/lumera-frontiers/security/code-scanning/89

General fix: remove ambiguity inside quantified alternations by ensuring each alternative has a distinct prefix (or by excluding the special-token prefix from the fallback class), so the engine does not need to explore exponentially many partitions.

Best fix here (without changing behavior): in the line-1203 pattern, keep the explicit <<0>> branch but make the fallback character class reject <, so <<0>> can only be matched by its dedicated branch. This preserves intended matching while eliminating the overlap causing catastrophic backtracking.

Change needed in public/js/lib/tinymce/plugins/codesample/plugin.js:

  • In the interpolation-string pattern at line ~1203, replace:
    • (?:...|<<0>>|[^\\{"])*
    • with (?:...|<<0>>|[^\\{"<])*
  • No new imports, methods, or dependencies are required.

Suggested fixes powered by Copilot Autofix. Review carefully before merging.

…ression

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@mokesano mokesano self-assigned this Jun 2, 2026
@mokesano mokesano added bug Something isn't working enhancement New feature or request labels Jun 2, 2026
@mokesano
mokesano marked this pull request as ready for review June 2, 2026 17:30
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@mokesano
mokesano merged commit d78e0a4 into main Jun 2, 2026
8 checks passed
@mokesano
mokesano deleted the alert-autofix-89 branch June 2, 2026 17:44
@github-project-automation github-project-automation Bot moved this from Todo to Done in wizdam-fork Jun 2, 2026
mokesano added a commit that referenced this pull request Jul 29, 2026
Potential fix for code scanning alert no. 89: Inefficient regular expression
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant