v1.2.22: 3rd audit fixes — UniqueViolation→409, lock_check no-db→False, escName add & escape

This commit is contained in:
2026-07-31 18:20:33 +04:00
parent 06eb463088
commit 23688da90a
4 changed files with 7 additions and 3 deletions
+1 -1
View File
@@ -125,7 +125,7 @@ async function toggleScenarioSteps(defId) {
// \ → \\ (backslash)
// ' → \' (terminate JS string literal)
// HTML-escape уже не нужен — внутри JS-строки в атрибуте HTML-теги не парсятся.
const escName = def.name.replace(/\\/g,'\\\\').replace(/'/g,"\\'").replace(/"/g,'"');
const escName = def.name.replace(/&/g,'&').replace(/\\/g,'\\\\').replace(/'/g,"\\'").replace(/"/g,'"');
html += `<button class="btn btn-sm" style="margin-top:4px;font-size:11px;background:var(--brand-primary);color:#fff;" onclick="event.stopPropagation();runScenario(${defId})">▶ Запустить</button>`;
html += `<button class="btn btn-sm" style="margin-top:4px;margin-left:4px;font-size:11px;" onclick="event.stopPropagation();editScenario(${defId})">✏ Редактировать</button>`;
html += `<button class="btn btn-sm" style="margin-top:4px;margin-left:4px;font-size:11px;" onclick="event.stopPropagation();cloneScenario(${defId},'${escName}')">📋 Копировать</button>`;