Skip to content
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

fix: add the X-Cal-Signature-256 header to MEETING_ENDED webhook requests #13986

Merged
merged 2 commits into from
Mar 6, 2024

Conversation

swain
Copy link
Contributor

@swain swain commented Mar 5, 2024

What does this PR do?

Fixes #13985

Requirement/Documentation

  • If there is a requirement document, please, share it here.
  • If there is ab UI/UX design document, please, share it here.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Chore (refactoring code, technical debt, workflow improvements)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Tests (Unit/Integration/E2E or any other test)
  • This change requires a documentation update

How should this be tested?

I tested this change by running locally to validate that the header is sent correctly.

As far as I can tell, there are no existing test cases that validate this functionality (unit or end-to-end). I'm afraid I'm not familiar enough with how this project works to be able to bootstrap a new test suite for this logic.

If a reviewer wants to offer guidance to that end, I'd be happy to put something together.

Mandatory Tasks

  • Make sure you have self-reviewed the code. A decent size PR without self-review might be rejected.

Checklist

  • I have read the contributing guide
  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have checked if my PR needs changes to the documentation
  • I have checked if my changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked if new and existing unit tests pass locally with my changes

@CLAassistant
Copy link

CLAassistant commented Mar 5, 2024

CLA assistant check
All committers have signed the CLA.

Copy link

vercel bot commented Mar 5, 2024

@swain is attempting to deploy a commit to the cal Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Contributor

github-actions bot commented Mar 5, 2024

Thank you for following the naming conventions! 🙏 Feel free to join our discord and post your PR link.

@github-actions github-actions bot added webhooks area: webhooks, callback, webhook payload 🐛 bug Something isn't working labels Mar 5, 2024
@swain swain changed the title Add the X-Cal-Signature-256 header to MEETING_ENDED webhook requests fix: add the X-Cal-Signature-256 header to MEETING_ENDED webhook requests Mar 5, 2024
@swain swain marked this pull request as ready for review March 5, 2024 20:57
@graphite-app graphite-app bot added the community Created by Linear-GitHub Sync label Mar 5, 2024
@graphite-app graphite-app bot requested a review from a team March 5, 2024 20:57
Copy link

graphite-app bot commented Mar 5, 2024

Graphite Automations

"Add consumer team as reviewer" took an action on this PR • (03/05/24)

1 reviewer was added to this PR based on Keith Williams's automation.

"Add community label" took an action on this PR • (03/05/24)

1 label was added to this PR based on Keith Williams's automation.

Copy link
Contributor

github-actions bot commented Mar 5, 2024

📦 Next.js Bundle Analysis for @calcom/web

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

Copy link

graphite-app bot commented Mar 5, 2024

Graphite Automations

"Add consumer team as reviewer" took an action on this PR • (03/05/24)

1 reviewer was added to this PR based on Keith Williams's automation.

"Add community label" took an action on this PR • (03/05/24)

1 label was added to this PR based on Keith Williams's automation.

Copy link
Member

@CarinaWolli CarinaWolli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a small change to handle webhooks that don't have an appId, other than that it looks good 🙏

// Fetch the webhook configuration so that we can get the secret.
const [appId, subscriberId] = job.jobName.split("_");
const webhook = await prisma.webhook.findUniqueOrThrow({
where: { id: subscriberId, appId: appId !== "null" ? appId : null },
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

webhooks without an appId have a job name looking like that null_12341234

@CarinaWolli CarinaWolli enabled auto-merge (squash) March 6, 2024 00:23
@CarinaWolli CarinaWolli merged commit 9fd3594 into calcom:main Mar 6, 2024
30 of 38 checks passed
@swain
Copy link
Contributor Author

swain commented Mar 6, 2024

Thanks for the quick response @CarinaWolli!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working community Created by Linear-GitHub Sync webhooks area: webhooks, callback, webhook payload
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MEETING_ENDED webhook requests do not include a signature header
3 participants