Fix initialization order for menu controls#9
Conversation
There was a problem hiding this comment.
Sorry @DaKongOlta, your pull request is larger than the review limit of 150000 diff characters
| const startMode = startProc?.value || raceSettings.startProc || 'standing'; | ||
| tags.push(getStartProcedureLabel(startMode)); | ||
| tags.push(aiLabels[aiLevel] || `KI: ${aiLevel}`); | ||
| eventTraitSummary.innerHTML = tags.map(tag => `<span>${tag}</span>`).join(''); |
There was a problem hiding this comment.
security (javascript.browser.security.insecure-document-method): User controlled data in methods like innerHTML, outerHTML or document.write is an anti-pattern that can lead to XSS vulnerabilities
Source: opengrep
| const startMode = startProc?.value || raceSettings.startProc || 'standing'; | ||
| tags.push(getStartProcedureLabel(startMode)); | ||
| tags.push(aiLabels[aiLevel] || `KI: ${aiLevel}`); | ||
| eventTraitSummary.innerHTML = tags.map(tag => `<span>${tag}</span>`).join(''); |
There was a problem hiding this comment.
security (javascript.browser.security.insecure-innerhtml): User controlled data in a eventTraitSummary.innerHTML is an anti-pattern that can lead to XSS vulnerabilities
Source: opengrep
| `<span>PaceIdx ${paceIndex} • Form ${formText} • Morale ${moralePct}%</span>` + | ||
| `<span>Driver Stats P${paceStat} | I${intelStat} | C${consistStat} | R${riskStat}</span></li>`; | ||
| }); | ||
| gridIntroList.innerHTML = listItems.join(''); |
There was a problem hiding this comment.
security (javascript.browser.security.insecure-document-method): User controlled data in methods like innerHTML, outerHTML or document.write is an anti-pattern that can lead to XSS vulnerabilities
Source: opengrep
| `<span>PaceIdx ${paceIndex} • Form ${formText} • Morale ${moralePct}%</span>` + | ||
| `<span>Driver Stats P${paceStat} | I${intelStat} | C${consistStat} | R${riskStat}</span></li>`; | ||
| }); | ||
| gridIntroList.innerHTML = listItems.join(''); |
There was a problem hiding this comment.
security (javascript.browser.security.insecure-innerhtml): User controlled data in a gridIntroList.innerHTML is an anti-pattern that can lead to XSS vulnerabilities
Source: opengrep
| sectorFeed.forEach(item => { | ||
| const li = document.createElement('li'); | ||
| if (item.className) li.classList.add(item.className); | ||
| li.innerHTML = `<span class=\"tag\">S${item.sector}</span><span class=\"driver\">#${item.number} ${item.driver}</span><span class=\"value\">${formatSplit(item.time)}${item.label ? ' ' + item.label : ''}</span>`; |
There was a problem hiding this comment.
security (javascript.browser.security.insecure-document-method): User controlled data in methods like innerHTML, outerHTML or document.write is an anti-pattern that can lead to XSS vulnerabilities
Source: opengrep
| const container = document.createElement('div'); | ||
| container.className = 'archiveEntry'; | ||
| const header = document.createElement('header'); | ||
| header.innerHTML = `<span>${formatDateTime(entry.timestamp)}</span><span>${entry.trackLabel}</span>`; |
There was a problem hiding this comment.
security (javascript.browser.security.insecure-innerhtml): User controlled data in a header.innerHTML is an anti-pattern that can lead to XSS vulnerabilities
Source: opengrep
| container.appendChild(podium); | ||
| if (entry.fastestLap) { | ||
| const fl = document.createElement('div'); | ||
| fl.className = 'meta'; | ||
| fl.textContent |
There was a problem hiding this comment.
security (javascript.browser.security.insecure-document-method): User controlled data in methods like innerHTML, outerHTML or document.write is an anti-pattern that can lead to XSS vulnerabilities
Source: opengrep
| container.appendChild(podium); | ||
| if (entry.fastestLap) { | ||
| const fl = document.createElement('div'); | ||
| fl.className = 'meta'; | ||
| fl.textContent |
There was a problem hiding this comment.
security (javascript.browser.security.insecure-innerhtml): User controlled data in a div.innerHTML is an anti-pattern that can lead to XSS vulnerabilities
Source: opengrep
| if (entry.fastestLap) { | ||
| const fl = document.createElement('div'); | ||
| fl.className = 'meta'; | ||
| fl.textContent |
There was a problem hiding this comment.
security (javascript.browser.security.insecure-document-method): User controlled data in methods like innerHTML, outerHTML or document.write is an anti-pattern that can lead to XSS vulnerabilities
Source: opengrep
| if (entry.fastestLap) { | ||
| const fl = document.createElement('div'); | ||
| fl.className = 'meta'; | ||
| fl.textContent |
There was a problem hiding this comment.
security (javascript.browser.security.insecure-innerhtml): User controlled data in a row.innerHTML is an anti-pattern that can lead to XSS vulnerabilities
Source: opengrep
| const startMode = startProc?.value || raceSettings.startProc || 'standing'; | ||
| tags.push(getStartProcedureLabel(startMode)); | ||
| tags.push(aiLabels[aiLevel] || `KI: ${aiLevel}`); | ||
| eventTraitSummary.innerHTML = tags.map(tag => `<span>${tag}</span>`).join(''); |
There was a problem hiding this comment.
security (javascript.browser.security.insecure-document-method): User controlled data in methods like innerHTML, outerHTML or document.write is an anti-pattern that can lead to XSS vulnerabilities
Source: opengrep
| const startMode = startProc?.value || raceSettings.startProc || 'standing'; | ||
| tags.push(getStartProcedureLabel(startMode)); | ||
| tags.push(aiLabels[aiLevel] || `KI: ${aiLevel}`); | ||
| eventTraitSummary.innerHTML = tags.map(tag => `<span>${tag}</span>`).join(''); |
There was a problem hiding this comment.
security (javascript.browser.security.insecure-innerhtml): User controlled data in a eventTraitSummary.innerHTML is an anti-pattern that can lead to XSS vulnerabilities
Source: opengrep
| `<span>PaceIdx ${paceIndex} • Form ${formText} • Morale ${moralePct}%</span>` + | ||
| `<span>Driver Stats P${paceStat} | I${intelStat} | C${consistStat} | R${riskStat}</span></li>`; | ||
| }); | ||
| gridIntroList.innerHTML = listItems.join(''); |
There was a problem hiding this comment.
security (javascript.browser.security.insecure-document-method): User controlled data in methods like innerHTML, outerHTML or document.write is an anti-pattern that can lead to XSS vulnerabilities
Source: opengrep
| `<span>PaceIdx ${paceIndex} • Form ${formText} • Morale ${moralePct}%</span>` + | ||
| `<span>Driver Stats P${paceStat} | I${intelStat} | C${consistStat} | R${riskStat}</span></li>`; | ||
| }); | ||
| gridIntroList.innerHTML = listItems.join(''); |
There was a problem hiding this comment.
security (javascript.browser.security.insecure-innerhtml): User controlled data in a gridIntroList.innerHTML is an anti-pattern that can lead to XSS vulnerabilities
Source: opengrep
| sectorFeed.forEach(item => { | ||
| const li = document.createElement('li'); | ||
| if (item.className) li.classList.add(item.className); | ||
| li.innerHTML = `<span class=\"tag\">S${item.sector}</span><span class=\"driver\">#${item.number} ${item.driver}</span><span class=\"value\">${formatSplit(item.time)}${item.label ? ' ' + item.label : ''}</span>`; |
There was a problem hiding this comment.
security (javascript.browser.security.insecure-document-method): User controlled data in methods like innerHTML, outerHTML or document.write is an anti-pattern that can lead to XSS vulnerabilities
Source: opengrep
| card.style.border = '1px solid #1e293b'; | ||
| card.style.borderRadius = '10px'; | ||
| card.style.padding = '8px'; | ||
|
|
There was a problem hiding this comment.
security (javascript.browser.security.insecure-innerhtml): User controlled data in a header.innerHTML is an anti-pattern that can lead to XSS vulnerabilities
Source: opengrep
| const card = document.createElement('div'); | ||
| card.style.border = '1px solid #1e293b'; | ||
| card.style.borderRadius = '10px'; | ||
| card.style.padding = '8px'; | ||
|
|
There was a problem hiding this comment.
security (javascript.browser.security.insecure-document-method): User controlled data in methods like innerHTML, outerHTML or document.write is an anti-pattern that can lead to XSS vulnerabilities
Source: opengrep
| const card = document.createElement('div'); | ||
| card.style.border = '1px solid #1e293b'; | ||
| card.style.borderRadius = '10px'; | ||
| card.style.padding = '8px'; | ||
|
|
There was a problem hiding this comment.
security (javascript.browser.security.insecure-innerhtml): User controlled data in a div.innerHTML is an anti-pattern that can lead to XSS vulnerabilities
Source: opengrep
| card.style.border = '1px solid #1e293b'; | ||
| card.style.borderRadius = '10px'; | ||
| card.style.padding = '8px'; | ||
|
|
There was a problem hiding this comment.
security (javascript.browser.security.insecure-document-method): User controlled data in methods like innerHTML, outerHTML or document.write is an anti-pattern that can lead to XSS vulnerabilities
Source: opengrep
| card.style.border = '1px solid #1e293b'; | ||
| card.style.borderRadius = '10px'; | ||
| card.style.padding = '8px'; | ||
|
|
There was a problem hiding this comment.
security (javascript.browser.security.insecure-innerhtml): User controlled data in a row.innerHTML is an anti-pattern that can lead to XSS vulnerabilities
Source: opengrep
| } | ||
|
|
||
| function renderTeams() { | ||
| if (!teamsList) return; | ||
| teamsList.innerHTML = ''; | ||
| Object.entries(managerState.teams).forEach(([team, da |
There was a problem hiding this comment.
security (javascript.browser.security.insecure-document-method): User controlled data in methods like innerHTML, outerHTML or document.write is an anti-pattern that can lead to XSS vulnerabilities
Source: opengrep
| } | ||
|
|
||
| function renderTeams() { | ||
| if (!teamsList) return; | ||
| teamsList.innerHTML = ''; | ||
| Object.entries(managerState.teams).forEach(([team, da |
There was a problem hiding this comment.
security (javascript.browser.security.insecure-innerhtml): User controlled data in a card.innerHTML is an anti-pattern that can lead to XSS vulnerabilities
Source: opengrep
| function renderTeams() { | ||
| if (!teamsList) return; | ||
| teamsList.innerHTML = ''; | ||
| Object.entries(managerState.teams).forEach(([team, da |
There was a problem hiding this comment.
security (javascript.browser.security.insecure-document-method): User controlled data in methods like innerHTML, outerHTML or document.write is an anti-pattern that can lead to XSS vulnerabilities
Source: opengrep
| function renderTeams() { | ||
| if (!teamsList) return; | ||
| teamsList.innerHTML = ''; | ||
| Object.entries(managerState.teams).forEach(([team, da |
There was a problem hiding this comment.
security (javascript.browser.security.insecure-innerhtml): User controlled data in a header.innerHTML is an anti-pattern that can lead to XSS vulnerabilities
Source: opengrep
|
|
||
| function renderTeams() { | ||
| if (!teamsList) return; | ||
| teamsList.innerHTML = ''; | ||
| Object.entries(managerState.teams).forEach(([team, da |
There was a problem hiding this comment.
security (javascript.browser.security.insecure-document-method): User controlled data in methods like innerHTML, outerHTML or document.write is an anti-pattern that can lead to XSS vulnerabilities
Source: opengrep
|
|
||
| function renderTeams() { | ||
| if (!teamsList) return; | ||
| teamsList.innerHTML = ''; | ||
| Object.entries(managerState.teams).forEach(([team, da |
There was a problem hiding this comment.
security (javascript.browser.security.insecure-innerhtml): User controlled data in a div.innerHTML is an anti-pattern that can lead to XSS vulnerabilities
Source: opengrep
| function renderTeams() { | ||
| if (!teamsList) return; | ||
| teamsList.innerHTML = ''; | ||
| Object.entries(managerState.teams).forEach(([team, da |
There was a problem hiding this comment.
security (javascript.browser.security.insecure-document-method): User controlled data in methods like innerHTML, outerHTML or document.write is an anti-pattern that can lead to XSS vulnerabilities
Source: opengrep
| function renderTeams() { | ||
| if (!teamsList) return; | ||
| teamsList.innerHTML = ''; | ||
| Object.entries(managerState.teams).forEach(([team, da |
There was a problem hiding this comment.
security (javascript.browser.security.insecure-innerhtml): User controlled data in a row.innerHTML is an anti-pattern that can lead to XSS vulnerabilities
Source: opengrep
Summary
Testing
https://chatgpt.com/codex/tasks/task_e_68c9d8830d808324adea8afa75f49e4d