Invoices - Secure date/frequency input handling

This commit is contained in:
wrongecho
2026-05-20 13:32:21 +01:00
parent 67382a4c4c
commit 7211426292
3 changed files with 13 additions and 6 deletions

View File

@@ -2073,3 +2073,10 @@ function formatDuration($time) {
return implode(' ', $parts);
}
function validateDate($date) {
if (preg_match('/^\d{4}-\d{2}-\d{2}$/', $date)) {
return $date;
}
return date('Y-m-d'); // Fallback
}