You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: replace open-redirect blocklist with allowlist in syslog_get_import_xml_payload
Backslash-prefixed inputs (\evil.com, /\evil.com) and percent-encoded
schemes (%5cevil.com) bypassed the previous blocklist regex even after
urldecode(). The allowlist accepts only relative paths beginning with a
filename character — schemes, protocol-relative URLs, and backslash
prefixes all fail to match and collapse to index.php.
while ($user_partitions > $days && $i < cacti_sizeof($number_of_partitions)) {
428
429
$oldest = $number_of_partitions[$i];
429
430
430
431
/* PARTITION_NAME comes from information_schema, but validate the
431
432
format before DDL interpolation — MySQL does not support parameter
432
433
binding for DDL statements. */
433
434
if (!preg_match('/^d\d{8}$/', $oldest['PARTITION_NAME'])) {
434
-
cacti_log("SYSLOG ERROR: Unexpected partition name format '" . $oldest['PARTITION_NAME'] . "' for table '$table', skipping", false, 'SYSTEM');
435
+
cacti_log("SYSLOG ERROR: Unexpected partition name format '" . $oldest['PARTITION_NAME'] . "' for table '$table', skipping, cannot prune past this entry", false, 'SYSTEM');
435
436
$i++;
436
-
$user_partitions--;
437
+
/* Do NOT decrement $user_partitions: no partition was dropped,
438
+
so the actual count is unchanged. The upper bound on $i
439
+
prevents an infinite loop when all remaining names are invalid. */
0 commit comments