Skip to content

Potential fix for code scanning alert no. 25: Incomplete multi-character sanitization - #31

Merged
mokesano merged 6 commits into
mainfrom
alert-autofix-25
Jun 2, 2026
Merged

Potential fix for code scanning alert no. 25: Incomplete multi-character sanitization#31
mokesano merged 6 commits into
mainfrom
alert-autofix-25

Conversation

@mokesano

Copy link
Copy Markdown
Owner

Potential fix for https://github.com/mokesano/editorial-pro/security/code-scanning/25

The best fix is to avoid tag-structure stripping regexes and instead remove dangerous single characters (< and >) so no tag can be reconstructed. This preserves existing behavior intent (“return clean title text”) without introducing new dependencies.

In public/js/app/custom/Wizdam-Article.js, update the return expression inside extractTitle (line region around 932) from:

  • .replace(/<[^>]*>/g, '')

to:

  • .replace(/[<>]/g, '')

This change directly addresses incomplete multi-character sanitization and aligns with the recommended strategy for this CodeQL class. No imports, helper methods, or external packages are required.

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

…ter sanitization

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@mokesano mokesano self-assigned this Apr 28, 2026
@mokesano
mokesano requested a review from archoun April 28, 2026 10:52
@mokesano mokesano added bug Something isn't working documentation Improvements or additions to documentation enhancement New feature or request labels Apr 28, 2026
@mokesano
mokesano marked this pull request as ready for review April 28, 2026 10:52

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6da4ea6376

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread public/js/app/custom/Wizdam-Article.js Outdated

@archoun archoun left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Came on boy

@mokesano mokesano closed this Apr 29, 2026
@github-project-automation github-project-automation Bot moved this from Todo to Done in wizdam-fork Apr 29, 2026
@mokesano
mokesano deleted the alert-autofix-25 branch April 29, 2026 18:13
@mokesano
mokesano restored the alert-autofix-25 branch June 2, 2026 18:08
@mokesano mokesano reopened this Jun 2, 2026

@mokesano mokesano left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kembali ke kode original

Comment thread public/js/app/custom/Wizdam-Article.js Outdated
@mokesano
mokesano merged commit 181d0b1 into main Jun 2, 2026
8 checks passed
@mokesano
mokesano deleted the alert-autofix-25 branch June 2, 2026 18:59
mokesano added a commit that referenced this pull request Jul 29, 2026
Potential fix for code scanning alert no. 25: Incomplete multi-character sanitization
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working documentation Improvements or additions to documentation enhancement New feature or request

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants