Runner: index.html-Rueckfall wie bisheriger Deploy (Kandidat/Platzhalter/Unterordner)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
54f307d12a
commit
8a028ce75a
7 files changed
+294
-10
No files matched your search
@@ -26,6 +26,13 @@ export function validateJob(body) {
|
||||
}
|
||||
index = i;
|
||||
}
|
||||
let displayName;
|
||||
if (body.displayName !== undefined && body.displayName !== '') {
|
||||
const d = body.displayName;
|
||||
// eslint-disable-next-line no-control-regex
|
||||
if (typeof d !== 'string' || d.length > 100 || /[\x00-\x1f\x7f]/.test(d)) return { ok: false, error: 'Ungültiger Anzeigename' };
|
||||
displayName = d;
|
||||
}
|
||||
const env = {};
|
||||
if (body.env !== undefined) {
|
||||
if (!body.env || typeof body.env !== 'object' || Array.isArray(body.env)) return { ok: false, error: 'Ungültige Variablen' };
|
||||
@@ -41,5 +48,6 @@ export function validateJob(body) {
|
||||
// Whitelist: keine ungeprüften Client-Felder im Job
|
||||
const job = { sub, repo, sha, branch, mode, env };
|
||||
if (index !== undefined) job.index = index;
|
||||
if (displayName !== undefined) job.displayName = displayName;
|
||||
return { ok: true, job };
|
||||
}
|
||||
Reference in new issue
Block a user