From c2948735f233eec177dd4aab194f71956f1b8661 Mon Sep 17 00:00:00 2001 From: FreddleSpl0it <75116288+FreddleSpl0it@users.noreply.github.com> Date: Tue, 7 Oct 2025 10:18:07 +0200 Subject: [PATCH] [Web] clear old app_passwd log entries --- data/web/inc/init_db.inc.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/data/web/inc/init_db.inc.php b/data/web/inc/init_db.inc.php index 1c4f0ebf2..83b27fbe1 100644 --- a/data/web/inc/init_db.inc.php +++ b/data/web/inc/init_db.inc.php @@ -4,7 +4,7 @@ function init_db_schema() try { global $pdo; - $db_version = "19082025_1436"; + $db_version = "07102025_1015"; $stmt = $pdo->query("SHOW TABLES LIKE 'versions'"); $num_results = count($stmt->fetchAll(PDO::FETCH_ASSOC)); @@ -1337,6 +1337,14 @@ function init_db_schema() $pdo->query($create); } + // Clear old app_passwd log entries + if ($db_version == "07102025_1015") { + $pdo->query("DELETE FROM logs + WHERE JSON_EXTRACT(`call`, '$[0]') = 'app_passwd' + AND JSON_EXTRACT(`call`, '$[1]') = 'edit' + AND role != 'unauthenticated';"); + } + // Mitigate imapsync argument injection issue $pdo->query("UPDATE `imapsync` SET `custom_params` = '' WHERE `custom_params` LIKE '%pipemess%'