Skip to content
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions cloud-sync.js
Original file line number Diff line number Diff line change
Expand Up @@ -740,8 +740,15 @@ function openReportModal() {
// hand-edited files ever matter.
export function parseMsProjectXml(xml) {
const tag = (block, name) => {
const m = block.match(new RegExp(`<${name}>([^<]*)</${name}>`));
return m ? m[1].trim() : '';
// 🛡️ Sentinel: Replaced dynamic RegExp with string indexOf to prevent ReDoS via uncontrolled name arguments
const startTag = `<${name}>`;
Comment on lines 741 to +744
const endTag = `</${name}>`;
const startIndex = block.indexOf(startTag);
if (startIndex === -1) return '';
const contentStart = startIndex + startTag.length;
const endIndex = block.indexOf(endTag, contentStart);
if (endIndex === -1) return '';
return block.substring(contentStart, endIndex).trim();
};
const unescape = (s) => s
.replace(/&lt;/g, '<').replace(/&gt;/g, '>').replace(/&quot;/g, '"')
Expand Down
4 changes: 3 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; object-src 'none'; base-uri 'none'; form-action 'self';" />
<title>ScopeWeave Planner</title>
<link rel="preload" href="styles.css" as="style" />
<!-- ⚡ Bolt: Use modulepreload to fetch ES modules early and flatten network waterfall -->
<link rel="modulepreload" href="cloud-sync.js" />
<link rel="modulepreload" href="analytics.js" />
<link rel="modulepreload" href="app.js" />
Comment on lines +8 to 11
<link rel="stylesheet" href="styles.css" />
</head>
Expand Down
Loading