Commit 1be3c18
committed
[BUGFIX] Prevent infinite loop when trustedProperties validation fails
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: #12931 parent da15520 commit 1be3c18
1 file changed
+11
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
609 | 609 | | |
610 | 610 | | |
611 | 611 | | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
612 | 623 | | |
613 | 624 | | |
614 | 625 | | |
| |||
0 commit comments