|
|
@ -76,6 +76,8 @@ app.post('/api', (req, res) => { |
|
|
|
const bufferSignature = Buffer.from(signature); |
|
|
|
const bufferDigest = Buffer.from(digest); |
|
|
|
|
|
|
|
console.log(bufferDigest.length, bufferSignature.length) |
|
|
|
|
|
|
|
if (bufferSignature.length === bufferDigest.length && crypto.timingSafeEqual(bufferSignature, bufferDigest)) { |
|
|
|
// Secret is valid, update the repository
|
|
|
|
exec('/home/gnome.sh', (err, stdout, stderr) => { |
|
|
|