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] webhook-timestamp header to use current seconds since epoch value instead of event timestamp #5521

Merged

Conversation

jfcalvo
Copy link
Member

@jfcalvo jfcalvo commented Sep 20, 2024

Description

Using the same timestamp value in the payload and in the webhook-timestamp (this one used for verification) was causing an "message too old" error when verifying the webhook message.

Replacing it to be calculated in the moment of the webhook request should solve these associated problems.

Type of change

  • Fix

How Has This Been Tested

  • Test suite passing.
  • Tested manually with a listener verifying the webhook message.

Checklist

  • I added relevant documentation
  • I followed the style guidelines of this project
  • I did a self-review of my code
  • I made corresponding changes to the documentation
  • I confirm My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • I have added relevant notes to the CHANGELOG.md file (See https://keepachangelog.com/)

@jfcalvo jfcalvo requested a review from frascuchon September 20, 2024 11:17
@jfcalvo jfcalvo changed the title fix: webhook-timestamp header to use current seconds since epoch value instead of event timestamp [FIX] webhook-timestamp header to use current seconds since epoch value instead of event timestamp Sep 20, 2024
Copy link

codecov bot commented Sep 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.57%. Comparing base (a65eb96) to head (d14253b).
Report is 26 commits behind head on feat/add-webhooks-feature-branch.

Additional details and impacted files
@@                         Coverage Diff                          @@
##           feat/add-webhooks-feature-branch    #5521      +/-   ##
====================================================================
+ Coverage                             91.52%   91.57%   +0.05%     
====================================================================
  Files                                   158      159       +1     
  Lines                                  6345     6374      +29     
====================================================================
+ Hits                                   5807     5837      +30     
+ Misses                                  538      537       -1     
Flag Coverage Δ
argilla-server 91.57% <100.00%> (+0.05%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jfcalvo jfcalvo merged commit d2cfbed into feat/add-webhooks-feature-branch Sep 23, 2024
6 checks passed
@jfcalvo jfcalvo deleted the fix/webhook-timestamp-header branch September 23, 2024 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants