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

Return 200 OK on IDs not known in the system #14

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

SalimAtMollie
Copy link

This PR touches code in the Webhook.

When the webhook is called with an ID which is not in the backend, it returns a 409 HTTP status code. This reveals that the ID of that transaction does not belong to the merchant. As stated in the Mollie docs:

"To not leak any information to malicious third parties, it is recommended to return a 200 OK response even if the ID is not known to your system."

Because of this, I have deleted the lines of code which change the response code to 409 HTTP response when the order id did not match with any order id in the backend. Checked a few other integrations and they seem to do this properly (always return 200 OK).

Scenario to test this code:

Once installed, call the webhook of the webshop with any transaction/order id. The webhook should return a 200 OK even if the transaction is not in the backend.

<3 From Mollie TS

As stated in the Mollie docs:
"To not leak any information to malicious third parties, it is recommended to return a 200 OK response even if the ID is not known to your system."
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.

None yet

1 participant