فینورا پرو - سامانه جامع حسابداری و صدور فاکتور
fix: reject invalid UTC calendar dates
davoodmehraban89 committed
Oct 20, 2026 at 08:44 UTC
4bdae8ff72002d7ad17f7b0d7202236ddcd400e7
1 file changed
+1
-1
src/core/AuditService.js
+1
-1
@@ -7,7 +7,7 @@ const trustedAuditRows = new WeakSet();
7
const authorizedRestoreTransactions = new WeakMap();
8
const validUtc = value => typeof value === 'string' &&
9
/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/.test(value) &&
10
- !Number.isNaN(Date.parse(value));
10
+ !Number.isNaN(Date.parse(value)) && new Date(value).toISOString() === value;
11
export const isAuditServiceRow = row => !!row && trustedAuditRows.has(row);
12
13
const VALID_TYPES = new Set([