Closed tsteur closed 2 years ago
Getting this error:
To reproduce, set max actions per visit for example to 3 and configure a notification email.
3
Then issue 4 tracking requests. The 4th tracking request should result in an HTTP 500.
We noticed this yesterday ourselves as pretty much all tracking requests resulted in an HTTP 500 in one account.
The problem is that we shouldn't use twig to create the email in https://github.com/matomo-org/plugin-TrackingSpamPrevention/blob/4.x-dev/BanIpNotificationEmail.php#L30
The email content is very basic anyway so we could instead simply create the email content in PHP directly.
For security we might want to call Common::sanitizeInputValue($string) for each of the values.
Common::sanitizeInputValue($string)
@AltamashShaikh be great to look into this one soon.
@tsteur will start working on this from tomorrow
Getting this error:
To reproduce, set max actions per visit for example to
3
and configure a notification email.Then issue 4 tracking requests. The 4th tracking request should result in an HTTP 500.
We noticed this yesterday ourselves as pretty much all tracking requests resulted in an HTTP 500 in one account.
The problem is that we shouldn't use twig to create the email in https://github.com/matomo-org/plugin-TrackingSpamPrevention/blob/4.x-dev/BanIpNotificationEmail.php#L30
The email content is very basic anyway so we could instead simply create the email content in PHP directly.
For security we might want to call
Common::sanitizeInputValue($string)
for each of the values.