Skip to content
This repository has been archived by the owner on Apr 11, 2024. It is now read-only.

Return 401 on webhook validation errors #425

Merged
merged 2 commits into from
Jul 20, 2022

Conversation

paulomarg
Copy link
Contributor

WHY are these changes introduced?

Closes #396

Shopify rejects apps that don't return a 401 Unauthorized response when they receive an invalid HMAC in a webhook request, and the library currently returns 403.

WHAT is this pull request doing?

Changing the response code in that scenario to 401. Also changing the "handler not found" scenario to return a 404 instead.

Type of change

  • Patch: Bug (non-breaking change which fixes an issue)

Checklist

  • I have added a changelog entry, prefixed by the type of change noted above
  • I have added/updated tests for this change

@paulomarg paulomarg requested a review from a team as a code owner July 19, 2022 15:39
@paulomarg paulomarg force-pushed the return_401_on_webhook_failure branch from ee53114 to 25aa560 Compare July 19, 2022 15:41
@paulomarg paulomarg force-pushed the return_401_on_webhook_failure branch from 25aa560 to 852c9d5 Compare July 19, 2022 17:52
@mkevinosullivan mkevinosullivan merged commit 4361a33 into main Jul 20, 2022
@mkevinosullivan mkevinosullivan deleted the return_401_on_webhook_failure branch July 20, 2022 16:03
@shopify-shipit shopify-shipit bot temporarily deployed to production July 20, 2022 21:00 Inactive
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Webhooks prevent App from passing automated checks
2 participants