gtalarico / pyairtable

Python Api Client for Airtable
https://pyairtable.readthedocs.io
MIT License
765 stars 138 forks source link

Fix webhook signature header #312

Closed valentinbourgoin closed 10 months ago

valentinbourgoin commented 11 months ago

Hi guys,

Following Airtable documentation here, the X-Airtable-Content-MAC header contains a hmac-sha256= prefix. In the WebhookNotification.from_request() method, a wrong prefix hmac-sha256- is added to the expected hashed value.

CleanShot 2023-10-17 at 12 28 24@2x

Thanks for your work πŸ™

codecov[bot] commented 11 months ago

Codecov Report

Merging #312 (488d257) into main (308c269) will not change coverage. The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main     #312   +/-   ##
=======================================
  Coverage   96.11%   96.11%           
=======================================
  Files          21       21           
  Lines        1157     1157           
=======================================
  Hits         1112     1112           
  Misses         45       45           
Files Coverage Ξ”
pyairtable/models/webhook.py 100.00% <100.00%> (ΓΈ)
mesozoic commented 11 months ago

Oops, that is just a straight up typo. Good catch, and thanks for contributing!

This repo requires all commits to be signed, which is pretty easy to do with an SSH key. Do you mind setting that up, amending your commit, and force-pushing to update the PR branch? I could rebase the branch for you, but then GitHub won't give you any credit for the fix. :)

mesozoic commented 10 months ago

@valentinbourgoin If you've got time to rebase your branch with signed commits enabled, I will merge this as-is so GitHub will give you credit 😁. If I don't hear back in a few days, I'll copy the branch and merge it myself.

valentinbourgoin commented 10 months ago

Hey @mesozoic, My commit is verified now :) Thanks !!