From 314e4407a0aa218510aedd45f4086012c47bb672 Mon Sep 17 00:00:00 2001 From: Michael Kaufmann Date: Sun, 22 Jan 2023 15:04:19 +0100 Subject: [PATCH 1/2] add lasst successful login to table-columns for customer overview Signed-off-by: Michael Kaufmann --- lib/tablelisting/admin/tablelisting.customers.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/tablelisting/admin/tablelisting.customers.php b/lib/tablelisting/admin/tablelisting.customers.php index f742f94c..bfe663ce 100644 --- a/lib/tablelisting/admin/tablelisting.customers.php +++ b/lib/tablelisting/admin/tablelisting.customers.php @@ -110,6 +110,11 @@ return [ 'class' => 'text-center', 'callback' => [Text::class, 'boolean'], ], + 'c.lastlogin_succ' => [ + 'label' => lng('admin.lastlogin_succ'), + 'field' => 'lastlogin_succ', + 'callback' => [Text::class, 'timestamp'], + ], 'c.phpenabled' => [ 'label' => lng('admin.phpenabled'), 'field' => 'phpenabled', @@ -138,7 +143,7 @@ return [ 'class' => 'text-center', 'callback' => [Text::class, 'boolean'], ], - 'api_allowed' => [ + 'c.api_allowed' => [ 'label' => lng('usersettings.api_allowed.title'), 'field' => 'api_allowed', 'class' => 'text-center', From d090e485447145f0642601561fd70f32cf24ce8d Mon Sep 17 00:00:00 2001 From: Michael Kaufmann Date: Mon, 23 Jan 2023 08:58:42 +0100 Subject: [PATCH 2/2] validate result of Net_DNS2_Resolver::query (CNAME's are being resolved to their corresponding target A/AAAA addresses); fixes #1089 Signed-off-by: Michael Kaufmann --- lib/Froxlor/PhpHelper.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/Froxlor/PhpHelper.php b/lib/Froxlor/PhpHelper.php index 820f14a7..c81f50bd 100644 --- a/lib/Froxlor/PhpHelper.php +++ b/lib/Froxlor/PhpHelper.php @@ -263,7 +263,9 @@ class PhpHelper try { $answer = $resolver->query($host, 'A')->answer; foreach ($answer as $rr) { - $ips[] = inet_ntop(inet_pton($rr->address)); + if ($rr instanceof Net_DNS2_RR_A) { + $ips[] = inet_ntop(inet_pton($rr->address)); + } } } catch (Net_DNS2_Exception $e) { // we can't do anything here, just continue @@ -274,7 +276,9 @@ class PhpHelper try { $answer = $resolver->query($host, 'AAAA')->answer; foreach ($answer as $rr) { - $ips[] = inet_ntop(inet_pton($rr->address)); + if ($rr instanceof Net_DNS2_RR_AAAA) { + $ips[] = inet_ntop(inet_pton($rr->address)); + } } } catch (Net_DNS2_Exception $e) { // we can't do anything here, just continue