#440 show comparison data

This commit is contained in:
Roland Gruber 2025-07-09 20:11:41 +02:00
parent 7559c9b37f
commit 60e6c91569
3 changed files with 14 additions and 7 deletions

View file

@ -1,4 +1,5 @@
September 2025 9.3
- Tree view: added comparison feature (440)
- Lamdaemon: run /usr/sbin/userdel.local before (and no longer after) home directory is deleted (443)
- LAM Pro:
-> SMS support for password sending and password self-reset (441)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 74 KiB

After

Width:  |  Height:  |  Size: 54 KiB

Before After
Before After

View file

@ -1482,16 +1482,20 @@ class TreeView {
* Stops processing if DN is invalid.
*
* @param string $dn DN
* @return bool DN is valid
*/
private function validateDn(string $dn): void {
private function validateDn(string $dn, bool $die = true): bool {
$dn = strtolower($dn);
$rootDns = TreeViewTool::getRootDns();
foreach ($rootDns as $rootDn) {
$rootDn = strtolower($rootDn);
if (str_ends_with($dn, $rootDn)) {
return;
return true;
}
}
if (!$die) {
return false;
}
logNewMessage(LOG_ERR, 'Invalid DN for tree view: ' . $dn);
die();
}
@ -1771,11 +1775,13 @@ class TreeView {
* @return string JSON data
*/
private function compare(): string {
$dnList = explode(',', $_POST['dnList']);
for ($i = 0; $i < count($dnList); $i++) {
$dn = base64_decode($dnList[$i]);
$this->validateDn($dn);
$dnList[$i] = $dn;
$dnListToCheck = explode(',', $_POST['dnList']);
$dnList = [];
foreach ($dnListToCheck as $dn) {
$dn = base64_decode($dn);
if ($this->validateDn($dn, false)) {
$dnList[] = $dn;
}
}
natcasesort($dnList);
try {