matomo-org / matomo

Empowering People Ethically with the leading open source alternative to Google Analytics that gives you full control over your data. Matomo lets you easily collect data from websites & apps and visualise this data and extract insights. Privacy is built-in. Liberating Web Analytics. Star us on Github? +1. And we love Pull Requests!
https://matomo.org/
GNU General Public License v3.0
19.89k stars 2.65k forks source link

All Websites dashboard accepts invalid dates #22573

Open textagroup opened 2 months ago

textagroup commented 2 months ago

The All Websites dashboard accepts invalid dates via URL parameters as per the examples below

https://demo.matomo.cloud/index.php?module=MultiSites&action=index&idSite=2&period=day&date=2024-02-31 takes an invalid date and handles it as the 3rd of March

https://demo.matomo.cloud/index.php?module=MultiSites&action=index&idSite=2&period=day&date=2024-09-31 takes an invalid date and handles it as the 1st of October

The JavaScript datepicker shows an error but the back end still processes the date and shows analytics for the handled date.

This is a bit of a edge case but we should probably throw an exception or display a warning.

allWebsitesDashboard