mirror of
https://github.com/mailcow/mailcow-dockerized.git
synced 2025-01-06 03:54:12 +02:00
[Web] Style changes to DKIM import section, push login errors to Redis channel
This commit is contained in:
parent
ace247b3b9
commit
a2f1c09a84
@ -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": [
|
||||
|
@ -66,9 +66,11 @@ services:
|
||||
- redis
|
||||
|
||||
clamd-mailcow:
|
||||
image: mailcow/clamd:1.0
|
||||
image: mailcow/clamd:1.1
|
||||
build: ./data/Dockerfiles/clamd
|
||||
restart: always
|
||||
environment:
|
||||
- SKIP_CLAMD=${SKIP_CLAMD:-n}
|
||||
dns:
|
||||
- 172.22.1.254
|
||||
dns_search: mailcow-network
|
||||
@ -143,7 +145,7 @@ services:
|
||||
- phpfpm
|
||||
|
||||
sogo-mailcow:
|
||||
image: mailcow/sogo:1.0
|
||||
image: mailcow/sogo:1.1
|
||||
build: ./data/Dockerfiles/sogo
|
||||
depends_on:
|
||||
unbound-mailcow:
|
||||
@ -171,7 +173,7 @@ services:
|
||||
- sogo
|
||||
|
||||
dovecot-mailcow:
|
||||
image: mailcow/dovecot:1.1
|
||||
image: mailcow/dovecot:1.2
|
||||
build: ./data/Dockerfiles/dovecot
|
||||
depends_on:
|
||||
unbound-mailcow:
|
||||
@ -206,7 +208,7 @@ services:
|
||||
- dovecot
|
||||
|
||||
postfix-mailcow:
|
||||
image: mailcow/postfix:1.0
|
||||
image: mailcow/postfix:1.1
|
||||
build: ./data/Dockerfiles/postfix
|
||||
depends_on:
|
||||
unbound-mailcow:
|
||||
@ -319,7 +321,7 @@ services:
|
||||
- acme
|
||||
|
||||
fail2ban-mailcow:
|
||||
image: mailcow/fail2ban:1.4
|
||||
image: mailcow/fail2ban:1.5
|
||||
build: ./data/Dockerfiles/fail2ban
|
||||
depends_on:
|
||||
- dovecot-mailcow
|
||||
|
Loading…
Reference in New Issue
Block a user