Skip to content

Conversation

lorenzulrich
Copy link

If the __trustedProperties hidden property of a form is manipulated or submit as empty, the HMAC validation fails, throwing an exception.

The normal exception handling then tries to forward the request to the formAction, which itself also validates the HMAC. This leads to an infinite loop which is only resolved after 100 iterations by throwing an InfiniteLoopException.

This process takes time, therefore Powermail is vulnerable to DoS attacks.

The change checks for a BadRequestException from the HMAC validation. In such a case, a redirect to the (then empty) formAction is performed and the error is logged.

Resolves: #1293

If the __trustedProperties hidden property of a form is manipulated
or submit as empty, the HMAC validation fails, throwing an exception.

The normal exception handling then tries to forward the request to
the formAction, which itself also validates the HMAC. This leads to an
infinite loop which is only resolved after 100 iterations by throwing
an InfiniteLoopException.

This process takes time, therefore Powermail is vulnerable to DoS
attacks.

The change checks for a BadRequestException from the HMAC validation.
In such a case, a redirect to the (then empty) formAction is
performed and the error is logged.

Resolves: in2code-de#1293
@mschwemer
Copy link
Collaborator

Hi

Thanks for your contribution.

In your PR the use Statement for BadRequestException is missing. Unfortunately I cannot modify your PR. Would you mind to add it?

Review and testing is fine (after adding use).

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.

Submitting a form with invalid trustedProperties leads to InfiniteLoopException

2 participants