Skip to content

Conversation

@brutal-factories
Copy link

WHY are these changes introduced?

Fixes #412

When validating the hmac of a request, if some of the query params contain non url-safe characters, those are encoded, and the HMAC on our side is then computed based on that version. This differs from how the Shopify backend computes theirs, so the validation always fails

WHAT is this pull request doing?

Decode the query string before computing its HMAC for validation

Type of change

  • Patch: Bug (non-breaking change which fixes an issue)
  • Minor: New feature (non-breaking change which adds functionality)
  • Major: Breaking change (fix or feature that would cause existing functionality to not work as expected)

In practice, this will probably break downstreams, even though it's functionally a bugfix, so I'm marking it as a major change unless it's unnecessary.

Checklist

  • I have added a changelog entry, prefixed by the type of change noted above
  • I have added/updated tests for this change
  • I have updated the documentation for public APIs from the library (if applicable)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Utils::validateHmac fails if the query params contains non url-safe characters.

1 participant