Browse Source

server test

master
Cailean Finn 6 months ago
parent
commit
952e44d834
  1. 2
      server.js

2
server.js

@ -70,6 +70,8 @@ app.post('/api', (req, res) => {
const bufferSignature = Buffer.from(signature, 'hex');
const bufferDigest = Buffer.from(digest, 'hex');
console.log(bufferSignature.length, bufferDigest.length)
if (bufferSignature.length === bufferDigest.length && crypto.timingSafeEqual(bufferSignature, bufferDigest)) {
// Secret is valid, update the repository
res.status(200).send('Repository updated successfully');

Loading…
Cancel
Save