diff --git a/app/hooks/SummaryReport.php b/app/hooks/SummaryReport.php index dbad240..2e597f4 100644 --- a/app/hooks/SummaryReport.php +++ b/app/hooks/SummaryReport.php @@ -2111,6 +2111,8 @@ private function date_to_ts($date){ } private function valid_app_date($date, $default = false) { + // only allow digits, a, p, m, whitespace and valid separators (.,-/) and strip everything else + $date = trim(preg_replace('/[^\d\s-\.,\/apm:]/i', '', $date)); return $this->date_to_ts($date) ? $date : $default; }