Skip to content

Conversation

emnsen
Copy link

@emnsen emnsen commented Feb 17, 2023

If the payload contains slashed and if you encode the data manually, then the default json_encode function escapes the slashes which causes the verification to fail.

In my case, I decoded the payload with json_decode and then encoded it before the verification. However, the payload contained the user agent data, which has slashes, and the json_encode function was escaping the slashes, causing the verification to fail. So, I encoded the data like json_encode($payload, JSON_UNESCAPED_SLASHES) with the flag, and it started to verify successfully.

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.

1 participant