Basic brute force detection added. Accounts throttle by captcha after 5 failed attempts, and locked out for 24 hours after 200 attempts.

This commit is contained in:
rainbow napkin 2024-12-26 17:46:35 -05:00
parent e0f53df176
commit 9c18c23ad5
13 changed files with 463 additions and 50 deletions

35
www/css/login.css Normal file
View file

@ -0,0 +1,35 @@
/*Canopy - The next generation of stoner streaming software
Copyright (C) 2024 Rainbownapkin and the TTN Community
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.*/
form{
display: flex;
flex-direction: column;
align-items: center;
gap: 0.5em;
margin: 5% 17%;
}
.login-page-prompt{
width: 100%
}
#login-page-button{
width: 6em;
height: 2em;
}
.danger-text{
text-align: center;
}

View file

@ -66,8 +66,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.*/
--altcha-color-base: var(--bg1);
--altcha-color-border: var(--accent1);
--altcha-color-text: var(--accent1);
--altcha-color-border-focus: currentColor;
--altcha-color-error-text: #f23939;
--altcha-color-error-text: var(--danger0);
--altcha-max-width: 260px;
}
@ -118,8 +117,25 @@ button:active{
box-shadow: var(--focus-glow0-alt0);
}
input{
accent-color: var(--focus0);
input:focus, textarea:focus{
outline: none;
box-shadow: var(--focus-glow0);
}
input:checked{
accent-color: var(--focus0-alt0);
box-shadow: var(--focus-glow0);
}
/* NOT! -Wayne */
input:not([type='checkbox']):not(.navbar-item), textarea {
border-radius: 1em;
border: none;
padding: 0.1em 0.5em;
}
textarea{
border-bottom-right-radius: 0;
}
.danger-button{
@ -139,7 +155,7 @@ input{
box-shadow: var(--danger-glow0-alt1);
}
.danger-link{
.danger-link, .danger-text{
color: var(--danger0);
}
@ -200,6 +216,7 @@ div.control-prompt:focus-within{
input.control-prompt, input.control-prompt:focus{
border: none;
outline: none;
box-shadow: none;
}