Skip to content

Conversation

kueken
Copy link
Collaborator

@kueken kueken commented Jul 21, 2025

Potential fix for https://github.com/E2OpenPlugins/e2openplugin-OpenWebif/security/code-scanning/25

To fix the problem, we need to ensure that all occurrences of the backslash (\) in the string s are replaced. This can be achieved by using a regular expression with the global flag (g) instead of the current string literal. Specifically, replace('\\', '') should be replaced with replace(/\\/g, ''). This ensures that every instance of the backslash is removed from the string as intended.

The change will be made in the unescapeFormat function on line 803. No other parts of the code need modification. The functionality of regexEscape remains unchanged.


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

…ing or encoding

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@kueken kueken marked this pull request as ready for review July 21, 2025 15:13
@kueken kueken merged commit 8257c14 into master Jul 21, 2025
6 of 7 checks passed
@kueken kueken deleted the alert-autofix-25 branch July 21, 2025 15:13
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