FIX - resolve CodeQL security alerts (#16)

This commit is contained in:
DerEchteAlec
2026-08-20 17:26:26 +02:00
committed by GitHub
parent 5b5e9fe914
commit 9aec3eefef
5 changed files with 38 additions and 5 deletions
+1 -1
View File
@@ -4657,7 +4657,7 @@ app.post('/api/:endpoint', async (request, response, next) => {
if (endpoint === 'memos:devCapture') {
loggedBody.audioDataUrl = `<${String(request.body.audioDataUrl ?? '').length} characters>`
}
console.log(`[NUI] ${endpoint}`, loggedBody)
console.log('[NUI]', endpoint, loggedBody)
if (endpoint === 'music:bootstrap') {
response.json({ success: true, data: musicBootstrap() })
return
+12
View File
@@ -1177,6 +1177,18 @@ async function main() {
'factory reset did not restore a browser-testable setup state',
)
const loggedRequests = []
const originalConsoleLog = console.log
try {
console.log = (...values) => loggedRequests.push(values)
await post(baseUrl, '%25s', { marker: 'format-string' })
} finally {
console.log = originalConsoleLog
}
assert.deepEqual(loggedRequests, [
['[NUI]', '%s', { marker: 'format-string' }],
])
const unknown = await post(baseUrl, 'development:missing-mock', {})
assert.deepEqual(unknown, {
error: 'mock_endpoint_missing',