update
This commit is contained in:
@@ -68,7 +68,7 @@ app.post('/api', (req, res) => {
|
|||||||
|
|
||||||
// Verify the secret
|
// Verify the secret
|
||||||
const hmac = crypto.createHmac('sha256', GITEA_SECRET);
|
const hmac = crypto.createHmac('sha256', GITEA_SECRET);
|
||||||
const digest = `sha256=${hmac.update(payload).digest('hex')}`;
|
const digest = `${hmac.update(payload).digest('hex')}`;
|
||||||
|
|
||||||
// Ensure both buffers have the same length before comparing
|
// Ensure both buffers have the same length before comparing
|
||||||
const bufferSignature = Buffer.from(signature);
|
const bufferSignature = Buffer.from(signature);
|
||||||
|
|||||||
Reference in New Issue
Block a user