Skip to content

Commit

Permalink
Fix code scanning alert no. 6: Incomplete string escaping or encoding
Browse files Browse the repository at this point in the history
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
(cherry picked from commit 372444c)
  • Loading branch information
tdonohue authored and github-actions[bot] committed Oct 23, 2024
1 parent 6198314 commit bb84d86
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/core/shared/metadata.utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ export class Metadata {
const outputKeys: string[] = [];
for (const inputKey of inputKeys) {
if (inputKey.includes('*')) {
const inputKeyRegex = new RegExp('^' + inputKey.replace(/\./g, '\\.').replace(/\*/g, '.*') + '$');
const inputKeyRegex = new RegExp('^' + inputKey.replace(/\\/g, '\\\\').replace(/\./g, '\\.').replace(/\*/g, '.*') + '$');
for (const mapKey of Object.keys(mdMap)) {
if (!outputKeys.includes(mapKey) && inputKeyRegex.test(mapKey)) {
outputKeys.push(mapKey);
Expand Down

0 comments on commit bb84d86

Please sign in to comment.