Skip to content

Commit

Permalink
fix missing comment in auditlog() (#125)
Browse files Browse the repository at this point in the history
  • Loading branch information
David Coutadeur committed Oct 16, 2024
1 parent b2b8a9b commit 96cf107
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"datatables.net/datatables.net-bs5": "2.0.8",
"datatables.net/datatables.net-buttons-bs5": "3.0.2",
"fortawesome/font-awesome": "v6.5.2",
"ltb-project/ltb-common": "dev-main",
"ltb-project/ltb-common": "dev-44-openldap-account-disabling",
"twbs/bootstrap": "v5.3.2"
},
"scripts": {
Expand Down
8 changes: 7 additions & 1 deletion htdocs/disableaccount.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,19 @@
$result = "";
$dn = "";
$password = "";
$comment = "";

if (isset($_POST["dn"]) and $_POST["dn"]) {
$dn = $_POST["dn"];
} else {
$result = "dnrequired";
}

if (isset($_POST["comment"]) and $_POST["comment"]) {
$comment = $_POST["comment"];
}


if (!$use_disableaccount) {
$result = "actionforbidden";
}
Expand All @@ -38,7 +44,7 @@
}

if ($audit_log_file) {
auditlog($audit_log_file, $dn, $audit_admin, "disableaccount", $result);
auditlog($audit_log_file, $dn, $audit_admin, "disableaccount", $result, $comment);
}

header('Location: index.php?page=display&dn='.$dn.'&disableaccountresult='.$result);
8 changes: 7 additions & 1 deletion htdocs/enableaccount.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,19 @@
$result = "";
$dn = "";
$password = "";
$comment = "";

if (isset($_POST["dn"]) and $_POST["dn"]) {
$dn = $_POST["dn"];
} else {
$result = "dnrequired";
}

if (isset($_POST["comment"]) and $_POST["comment"]) {
$comment = $_POST["comment"];
}


if (!$use_enableaccount) {
$result = "actionforbidden";
}
Expand All @@ -38,7 +44,7 @@
}

if ($audit_log_file) {
auditlog($audit_log_file, $dn, $audit_admin, "enableaccount", $result);
auditlog($audit_log_file, $dn, $audit_admin, "enableaccount", $result, $comment);
}

header('Location: index.php?page=display&dn='.$dn.'&enableaccountresult='.$result);

0 comments on commit 96cf107

Please sign in to comment.