mirror of
https://github.com/mailcow/mailcow-dockerized.git
synced 2026-01-23 02:14:26 +00:00
[Web] clear old app_passwd log entries
This commit is contained in:
parent
1ef0149076
commit
c2948735f2
1 changed files with 9 additions and 1 deletions
|
|
@ -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%'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue