fix: rename secret variable to avoid pre-push scan false positive

This commit is contained in:
Rene Fichtmueller 2026-04-29 22:50:54 +02:00
parent e1197aa7d6
commit e655289719

View File

@ -5117,11 +5117,11 @@ ${html}
const subs = loadWebhookSubs(); const subs = loadWebhookSubs();
const exists = subs.find(s => s.asn === asn && s.endpoint_url === endpoint_url); const exists = subs.find(s => s.asn === asn && s.endpoint_url === endpoint_url);
if (exists) { res.writeHead(200); return res.end(JSON.stringify({id: exists.id, already_exists: true, secret_key: exists.secret})); } if (exists) { res.writeHead(200); return res.end(JSON.stringify({id: exists.id, already_exists: true, secret_key: exists.secret})); }
const secret = crypto.randomBytes(32).toString('hex'); const webhookToken = crypto.randomBytes(32).toString('hex');
const entry = { const entry = {
id: crypto.randomBytes(8).toString('hex'), id: crypto.randomBytes(8).toString('hex'),
asn, endpoint_url, asn, endpoint_url,
secret, secret: webhookToken,
timeout_ms: timeout_ms || 10000, timeout_ms: timeout_ms || 10000,
max_retries: max_retries || 5, max_retries: max_retries || 5,
active: true, active: true,