mirror of
https://github.com/itflow-org/itflow
synced 2026-05-25 20:28:19 +00:00
Invoices - Secure date/frequency input handling
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user