-
Notifications
You must be signed in to change notification settings - Fork 89
feat(raf-993): signing of open payments http payload. #3407
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for brilliant-pasca-3e80ec canceled.
|
🚀 Performance Test ResultsTest Configuration:
Test Metrics:
📜 Logs
|
test/sign-server/src/app.ts
Outdated
app.post('/http-signature-verify', async function handler(ffReq, ffReply) { | ||
const requestBody = JSON.parse(JSON.stringify(ffReq.body)) | ||
if (!validateBodyVerifySignature(requestBody as RequestBodySignatureVerify)) { | ||
return { | ||
statusCode: '400', | ||
body: 'Insufficient data in request body' | ||
} | ||
} | ||
const { method, url, headers, body } = requestBody | ||
|
||
if (!headers['signature'] || !headers['signature-input']) { | ||
return { | ||
statusCode: '400', | ||
body: '[signature-input] and/or [signature] headers are missing' | ||
} | ||
} | ||
|
||
if (!validateSignatureHeaders({ | ||
method, | ||
url, | ||
headers, | ||
body | ||
})) { | ||
return { | ||
statusCode: '401', | ||
body: 'Signature verification failed' | ||
} | ||
} | ||
|
||
ffReply.code(200).send({ | ||
signatureVerified: true | ||
}) | ||
}) |
Check failure
Code scanning / CodeQL
Missing rate limiting High test
authorization
Copilot Autofix
AI 6 days ago
Copilot could not generate an autofix suggestion
Copilot could not generate an autofix suggestion for this alert. Try pushing a new commit or if the problem persists contact support.
Changes proposed in this pull request
Context
Checklist
fixes #number
user-docs
label (if necessary)