public
nobgit
read
NobMail
Based on mailcow: dockerized
Languages
Repository composition by tracked source files.
PHP
49%
JavaScript
35%
HTML
9%
CSS
4%
Shell
2%
Python
1%
Lua
0%
Perl
0%
Ruby
0%
SCSS
0%
Create file
Wiki Documentation
Clone
https://nobgit.com/orgs/nobgit/nobmail.git
ssh://[email protected]:2222/orgs/nobgit/nobmail.git
Commit
[Web] clear old app_passwd log entries
c2948735
data/web/inc/init_db.inc.php | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
Diff
diff --git a/data/web/inc/init_db.inc.php b/data/web/inc/init_db.inc.php
index 1c4f0ebf..83b27fbe 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%'