mirror of
https://github.com/sky-systems/sky_phone.git
synced 2026-08-29 02:01:40 +00:00
FIX - resolve CodeQL security alerts (#16)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user