kin: KIN-INFRA-003 Исправить command injection через deploy_path в SSH-команде

This commit is contained in:
Gros Frumos 2026-03-17 18:24:02 +02:00
parent a4e5497401
commit e118b87a3e
2 changed files with 9 additions and 7 deletions

View file

@ -14,6 +14,7 @@ const consoleEl = ref<HTMLElement | null>(null)
let sinceId = 0
let userScrolled = false
let timer: ReturnType<typeof setInterval> | null = null
let scrollTimer: ReturnType<typeof setTimeout> | null = null
const MAX_LOGS = 500
@ -44,9 +45,9 @@ async function fetchLogs() {
sinceId = Math.max(...newLogs.map(l => l.id))
logs.value = [...logs.value, ...newLogs].slice(-MAX_LOGS)
// Scroll after DOM update
setTimeout(scrollToBottom, 0)
} catch (e: any) {
error.value = e.message
scrollTimer = setTimeout(scrollToBottom, 0)
} catch (e: unknown) {
error.value = e instanceof Error ? e.message : String(e)
}
}
@ -62,6 +63,7 @@ function startPolling() {
function stopPolling() {
if (timer) { clearInterval(timer); timer = null }
if (scrollTimer) { clearTimeout(scrollTimer); scrollTimer = null }
}
async function toggle() {