[Web] Style changes to DKIM import section, push login errors to Redis channel
This commit is contained in:
@@ -231,7 +231,7 @@ $tfa_data = get_tfa();
|
||||
<button class="btn btn-default" id="add_item" data-id="dkim" data-api-url='add/dkim' data-api-attr='{}' href="#"><span class="glyphicon glyphicon-plus"></span> <?=$lang['admin']['add'];?></button>
|
||||
</form>
|
||||
|
||||
<legend data-target="#import_dkim" style="margin-top:40px;cursor:pointer" data-toggle="collapse">↳ <?=$lang['admin']['import_private_key'];?></legend>
|
||||
<legend data-target="#import_dkim" style="margin-top:40px;cursor:pointer" id="import_dkim_legend" unselectable="on" data-toggle="collapse"><span id="import_dkim_arrow" class="rotate glyphicon glyphicon-menu-down"></span> <?=$lang['admin']['import_private_key'];?></legend>
|
||||
<div id="import_dkim" class="collapse">
|
||||
<form class="form" data-id="dkim_import" role="form" method="post">
|
||||
<div class="form-group">
|
||||
|
@@ -31,3 +31,14 @@ body.modal-open {
|
||||
.inputMissingAttr {
|
||||
border-color: #FF4136;
|
||||
}
|
||||
.rotate {
|
||||
-moz-transition: all 0.3s linear;
|
||||
-webkit-transition: all 0.3s linear;
|
||||
transition: all 0.3s linear;
|
||||
}
|
||||
.rotate.animation {
|
||||
-ms-transform:rotateX(180deg);
|
||||
-moz-transform:rotateX(180deg);
|
||||
-webkit-transform:rotateX(180deg);
|
||||
transform:rotateX(180deg);
|
||||
}
|
@@ -91,4 +91,11 @@ body.modal-open {
|
||||
max-width: 550px;
|
||||
z-index: 2000;
|
||||
}
|
||||
.input-group-sm .btn { margin-top: 0px !important }
|
||||
.input-group-sm .btn { margin-top: 0px !important }
|
||||
legend {
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none
|
||||
-o-user-select: none;
|
||||
user-select: none;
|
||||
}
|
@@ -168,6 +168,7 @@ function doveadm_authenticate($hash, $algorithm, $password) {
|
||||
}
|
||||
function check_login($user, $pass) {
|
||||
global $pdo;
|
||||
global $redis;
|
||||
if (!filter_var($user, FILTER_VALIDATE_EMAIL) && !ctype_alnum(str_replace(array('_', '.', '-'), '', $user))) {
|
||||
return false;
|
||||
}
|
||||
@@ -229,10 +230,12 @@ function check_login($user, $pass) {
|
||||
}
|
||||
if (!isset($_SESSION['ldelay'])) {
|
||||
$_SESSION['ldelay'] = "0";
|
||||
$redis->publish("F2B_CHANNEL", "mailcow UI: Invalid password for " . $user . " by " . $_SERVER['REMOTE_ADDR']);
|
||||
error_log("mailcow UI: Invalid password for " . $user . " by " . $_SERVER['REMOTE_ADDR']);
|
||||
}
|
||||
elseif (!isset($_SESSION['mailcow_cc_username'])) {
|
||||
$_SESSION['ldelay'] = $_SESSION['ldelay']+0.5;
|
||||
$redis->publish("F2B_CHANNEL", "mailcow UI: Invalid password for " . $user . " by " . $_SERVER['REMOTE_ADDR']);
|
||||
error_log("mailcow UI: Invalid password for " . $user . " by " . $_SERVER['REMOTE_ADDR']);
|
||||
}
|
||||
sleep($_SESSION['ldelay']);
|
||||
|
@@ -47,6 +47,10 @@ jQuery(function($){
|
||||
e.preventDefault();
|
||||
draw_rspamd_history();
|
||||
});
|
||||
$("#import_dkim_legend").on('click', function(e) {
|
||||
e.preventDefault();
|
||||
$('#import_dkim_arrow').toggleClass("animation");
|
||||
});
|
||||
function draw_postfix_logs() {
|
||||
ft_postfix_logs = FooTable.init('#postfix_log', {
|
||||
"columns": [
|
||||
|
Reference in New Issue
Block a user