fix: Persistent storage on webhooks
This commit is contained in:
parent
d9b74ada84
commit
b8d8ee4560
@ -78,7 +78,8 @@ export async function getApplicationWebhook({ projectId, branch }) {
|
|||||||
destinationDocker: true,
|
destinationDocker: true,
|
||||||
settings: true,
|
settings: true,
|
||||||
gitSource: { include: { githubApp: true, gitlabApp: true } },
|
gitSource: { include: { githubApp: true, gitlabApp: true } },
|
||||||
secrets: true
|
secrets: true,
|
||||||
|
persistentStorage: true
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (!application) {
|
if (!application) {
|
||||||
|
@ -53,8 +53,8 @@ export const post: RequestHandler = async (event) => {
|
|||||||
'sha256=' + hmac.update(JSON.stringify(body)).digest('hex'),
|
'sha256=' + hmac.update(JSON.stringify(body)).digest('hex'),
|
||||||
'utf8'
|
'utf8'
|
||||||
);
|
);
|
||||||
const checksum = Buffer.from(githubSignature, 'utf8');
|
|
||||||
if (!dev) {
|
if (!dev) {
|
||||||
|
const checksum = Buffer.from(githubSignature, 'utf8');
|
||||||
if (checksum.length !== digest.length || !crypto.timingSafeEqual(digest, checksum)) {
|
if (checksum.length !== digest.length || !crypto.timingSafeEqual(digest, checksum)) {
|
||||||
return {
|
return {
|
||||||
status: 500,
|
status: 500,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user