Change admin layout, add Postfix logs
This commit is contained in:
@@ -5202,7 +5202,10 @@ function get_logs($container, $lines = 100) {
|
||||
}
|
||||
if ($container == "postfix-mailcow") {
|
||||
if ($data = $redis->lRange('POSTFIX_MAILLOG', 1, $lines)) {
|
||||
return $data;
|
||||
foreach ($data as $json_line) {
|
||||
$data_array[] = json_decode($json_line, true);
|
||||
}
|
||||
return $data_array;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
@@ -21,8 +21,8 @@ $csrfProtector = new csrfProtector;
|
||||
class mailcowCsrfProtector extends csrfprotector {
|
||||
public static function logCSRFattack() {
|
||||
$_SESSION['return'] = array(
|
||||
'type' => 'danger',
|
||||
'msg' => 'CSRF violation'
|
||||
'type' => 'warning',
|
||||
'msg' => 'CSRF violation, please try again.'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user