Skip to content

Commit 3e4bf1b

Browse files
authored
refactor(logs): align failed login attempt message with failed sign-i… (#2914)
Signed-off-by: Ludovic Ortega <ludovic.ortega@adminafk.fr>
1 parent 86e780e commit 3e4bf1b

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

docs/extending-seerr/fail2ban.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ To use Fail2ban with Seerr, create a new file named `seerr.local` in your Fail2b
1414

1515
```
1616
[Definition]
17-
failregex = .*\[warn\]\[API\]\: Failed sign-in attempt.*"ip":"<HOST>"
17+
failregex = .*\[warn\]\[(API|Auth)\]\: Failed sign-in attempt.*"ip":"<HOST>"
1818
```
1919

2020
You can then add a jail using this filter in `jail.local`. Please see the [Fail2ban documentation](https://github.com/fail2ban/fail2ban/wiki) for details on how to configure the jail.

server/routes/auth.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,7 @@ authRoutes.post('/jellyfin', async (req, res, next) => {
536536

537537
case ApiErrorCode.InvalidCredentials:
538538
logger.warn(
539-
'Failed login attempt from user with incorrect Jellyfin credentials',
539+
'Failed sign-in attempt from user with incorrect Jellyfin credentials',
540540
{
541541
label: 'Auth',
542542
account: {
@@ -553,7 +553,7 @@ authRoutes.post('/jellyfin', async (req, res, next) => {
553553

554554
case ApiErrorCode.NotAdmin:
555555
logger.warn(
556-
'Failed login attempt from user without admin permissions',
556+
'Failed sign-in attempt from user without admin permissions',
557557
{
558558
label: 'Auth',
559559
account: {
@@ -569,7 +569,7 @@ authRoutes.post('/jellyfin', async (req, res, next) => {
569569

570570
case ApiErrorCode.NoAdminUser:
571571
logger.warn(
572-
'Failed login attempt from user without admin permissions and no admin user exists',
572+
'Failed sign-in attempt from user without admin permissions and no admin user exists',
573573
{
574574
label: 'Auth',
575575
account: {

0 commit comments

Comments
 (0)