Commit Graph

5000 Commits

Author SHA1 Message Date
Encotric
3a61d6afbc Add EICAR test 2024.06.14 2025-03-11 21:36:38 +01:00
Sebastian
5ddf773db4 Merge pull request #58 from heviat/oidc
Refactor OIDC client + Fix user info request
2025-03-11 21:25:01 +01:00
Encotric
217afcf48e Fix SonarCloud issues 2025-03-11 21:23:35 +01:00
Encotric
35046ad4e4 Add release notes 2025-03-11 21:14:17 +01:00
Encotric
4fb34cb0ba Fix token parameter naming in user info request (#50) 2025-03-11 21:02:04 +01:00
Encotric
e77a5d09c0 Add lazy provider info retrival 2025-02-24 18:33:57 +01:00
Encotric
4be260091b Fix example 2025-02-24 18:33:01 +01:00
Encotric
36ada96bae Merge remote-tracking branch 'origin/2024.06' into oidc 2025-02-20 12:19:40 +01:00
Encotric
cd93f19b08 Merge branch '2024.06' into oidc 2025-02-20 12:18:39 +01:00
Encotric
c40b260802 Add error response for oidc login 2025-02-20 12:18:32 +01:00
Encotric
6693aea52a Merge branch 'oidc' of https://github.com/heviat/Mailu-OIDC into oidc 2025-02-20 12:08:06 +01:00
Encotric
d9129fd362 Update CI deploy dependencies for arm 2024.06.13 2025-02-14 20:50:48 +01:00
Encotric
9577d2c829 Fix docker credentials 2025-02-14 20:35:34 +01:00
Encotric
365a952712 Add arm images 2025-02-14 20:30:24 +01:00
Sebastian Wilke
dfe706148d Fix typo 2024.06.12 2025-02-13 20:16:20 +01:00
Sebastian Wilke
cd143af258 Fix session cookie attributes 2024.06.11 2025-02-13 19:38:34 +01:00
Sebastian Wilke
247e94dd6b Cleanup and improve error handling 2025-02-13 19:37:43 +01:00
Wombosvideo
61f75849da Add external link icon for OIDC users to password update link in sidebar 2025-02-09 20:46:06 +01:00
Wombosvideo
0ed1e9c8c8 Refactor OIDC client and imports for improved organization
- Move OIDC client to a separate module
- Organize imports
2025-02-09 20:43:38 +01:00
Wombosvideo
2bdf2c7bea Replace deprecated logger.warn calls with logger.warning for consistency
Some files were not included due to currently being refactored
2025-02-09 13:35:30 +01:00
Luca
674f09e5a4 Merge pull request #52 from heviat/oidc
Fix inconsistent naming and duplicate code
2024.06.10
2025-02-08 18:34:08 +01:00
Wombosvideo
4b81c932a0 Add task to finish backchannel logout 2025-02-08 18:27:53 +01:00
Wombosvideo
23cdbafcd7 Fix inconsistent naming and duplicate code 2025-02-08 18:27:24 +01:00
Sebastian Wilke
7667c59ef5 Remove duplicated code 2024.06.9 2025-01-24 22:39:54 +01:00
Sebastian Wilke
a61320eed2 Update managesieve 2024.06.8 2025-01-24 22:30:19 +01:00
Sebastian Wilke
aeb3a15f92 Merge branch '2024.06' of https://github.com/heviat/Mailu-OIDC into 2024.06 2025-01-24 22:21:13 +01:00
Sebastian Wilke
b9ca0e28b4 Fix managesieve test 2025-01-24 22:21:04 +01:00
Sebastian
94f265827a Merge pull request #49 from heviat/oidc
Fix #39
2025-01-24 22:09:47 +01:00
Sebastian Wilke
11b3e2f3e7 Fix #39 2025-01-24 22:06:33 +01:00
Sebastian Wilke
27a866b0b6 Remove arm-build dependency for deploy 2024.06.7 2024-12-29 14:11:29 +01:00
Sebastian Wilke
f08494c277 Undo boolean refactoring 2024-12-29 13:46:37 +01:00
Sebastian Wilke
d0e4fe8924 Fix boolean values 2024-12-29 13:33:11 +01:00
Sebastian Wilke
bbab7cd924 Add push trigger 2024-12-29 13:14:16 +01:00
Sebastian Wilke
344674c603 Merge branch 'oidc' into 2024.06 2024-12-29 13:12:48 +01:00
bors-mailu[bot]
fbefca44ca Merge #3697
3697: Include sensible error messages for LMTP protocol (backport #3696) r=mergify[bot] a=mergify[bot]

Running into the rate limit yields difficult to debug log messages by the smtp container. Specifically the `Temporary user lookup failure` message by the smtp container is misleading.

## Example

Although this is running on Podman, the bugs are in the Python code and almost certainly are not influenced by the host infrastructure. (Leaving aside that I likely have a configuration problem, because the client IP address is not passed along correctly. But the present fix applies nevertheless and is not related to any specific cause of the rate limit triggering.) 

### smtp logs

```shell
> podman logs --since "2024-12-25T07:33:31" --until "2024-12-25T07:33:33" systemd-mail-smtp
Dec 25 08:33:31 example postfix/smtpd[398]: connect from front[10.115.0.96]
INFO:root:Connect
Dec 25 08:33:31 example postfix/smtpd[398]: 6774324DE71C1: client=systemd-mail-front[10.115.0.96]
INFO:root:Connect
Dec 25 08:33:31 example postfix/cleanup[428]: 6774324DE71C1: message-id=<CAPhkJv+GTxVtwn6eNbBzPscohn6fgkhrYd2gEpUm2prr-5_7bg@mail.gmail.com>
Dec 25 08:33:32 example postfix/qmgr[376]: 6774324DE71C1: from=<SRS0=O1up=TS=gmail.com=fabiamos@example.com>, size=3968, nrcpt=1 (queue active)
Dec 25 08:33:32 example postfix/lmtp[429]: 6774324DE71C1: host front[10.115.0.96] said: 451 4.3.0 <fabian@example.com> Temporary user lookup failure (in reply to RCPT TO command)
Dec 25 08:33:32 example postfix/lmtp[429]: connect to front[10.115.0.9]:2525: Connection refused
Dec 25 08:33:32 example postfix/lmtp[429]: 6774324DE71C1: to=<fabian@example.com>, orig_to=<me+fancy@example.com>, relay=none, delay=0.63, delays=0.61/0.01/0.01/0, dsn=4.4.1, status=deferred (connect to front[10.115.0.9]:2525: Connection refused)
```

### admin logs

```shell
> podman logs --since "2024-12-25T07:33:31" --until "2024-12-25T07:33:33" systemd-mail-admin
10.115.0.96 - - [25/Dec/2024:08:33:31 +0100] "GET /internal/auth/email HTTP/1.0" 200 0 "-" "-"
[2024-12-25 08:33:32,030] WARNING in limiter: Authentication attempt from 10.115.0.99 has been rate-limited.
[2024-12-25 08:33:32,030] ERROR in app: Exception on /internal/auth/email [GET]
Traceback (most recent call last):
  File "/app/venv/lib/python3.12/site-packages/flask/app.py", line 1473, in wsgi_app
    response = self.full_dispatch_request()
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/venv/lib/python3.12/site-packages/flask/app.py", line 882, in full_dispatch_request
    rv = self.handle_user_exception(e)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/venv/lib/python3.12/site-packages/flask/app.py", line 880, in full_dispatch_request
    rv = self.dispatch_request()
         ^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/venv/lib/python3.12/site-packages/flask/app.py", line 865, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)  # type: ignore[no-any-return]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/mailu/internal/views/auth.py", line 27, in nginx_authentication
    status, code = nginx.get_status(flask.request.headers['Auth-Protocol'], 'ratelimit')
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/mailu/internal/nginx.py", line 140, in get_status
    return status, codes[protocol]
                   ~~~~~^^^^^^^^^^
KeyError: 'lmtp'
10.115.0.96 - - [25/Dec/2024:08:33:32 +0100] "GET /internal/auth/email HTTP/1.0" 200 0 "-" "-"
```

## What type of PR?

bug-fix

## What does this PR do?

### Related issue(s)
None

## Prerequisites
Before we can consider review and merge, please make sure the following list is done and checked.
If an entry in not applicable, you can check it or remove it from the list.

- [x] In case of feature or enhancement: documentation updated accordingly - not an enhancement
- [x] Unless it's docs or a minor change: add [changelog](https://mailu.io/master/contributors/workflow.html#changelog) entry file. - is a minor change
<hr>This is an automatic backport of pull request #3696 done by [Mergify](https://mergify.com).

Co-authored-by: Fabian Stanke <me+github@fmos.at>
2024-12-27 10:33:27 +00:00
Fabian Stanke
da8a1f2882 Adds towncrier entry for PR #3696 as requested
(cherry picked from commit 8a13316a0d)
2024-12-27 09:51:47 +00:00
Fabian Stanke
a4e3ade323 Include error messages for LMTP
These are difficult to debug log messages, when instead of an error message one gets a stack trace with `KeyError: 'lmtp'`

(cherry picked from commit ec1e49d137)
2024-12-27 09:51:47 +00:00
bors-mailu[bot]
91d477dfe0 Merge #3692
3692: Ensure mobileconfig has the right content-type (backport #3691) r=mergify[bot] a=mergify[bot]

## What type of PR?

bug-fix

## What does this PR do?

Ensure Apple mobileconfig is served using the right Content-Type

### Related issue(s)
- #3684

## Prerequisites
Before we can consider review and merge, please make sure the following list is done and checked.
If an entry in not applicable, you can check it or remove it from the list.

- [ ] In case of feature or enhancement: documentation updated accordingly
- [x] Unless it's docs or a minor change: add [changelog](https://mailu.io/master/contributors/workflow.html#changelog) entry file.
<hr>This is an automatic backport of pull request #3691 done by [Mergify](https://mergify.com).

Co-authored-by: Florent Daigniere <nextgens@freenetproject.org>
2024-12-23 11:29:18 +00:00
Florent Daigniere
7323fbd4a0 Ensure mobileconfig has the right content-type
(cherry picked from commit 64d0bb603d)
2024-12-22 19:15:27 +00:00
Sebastian Wilke
95943b7f7a Merge branch 'oidc' of https://github.com/heviat/Mailu-OIDC into oidc 2024-12-17 20:34:15 +01:00
Sebastian Wilke
4615e1139d Remove bord job 2024-12-17 20:34:06 +01:00
Sebastian
2d5d49c9c2 Merge branch 'master' into oidc 2024-12-17 20:23:41 +01:00
Sebastian Wilke
8f236d2ed0 Fix Dockerfiles 2024-12-17 20:16:28 +01:00
Sebastian Wilke
d2e69cc6c8 Merge remote-tracking branch 'upstream/2024.06' into oidc 2024-12-17 20:07:41 +01:00
bors-mailu[bot]
32fb10cb07 Merge #3653
3653: Don't check empty passwords against HIBP (backport #3650) r=nextgens a=mergify[bot]

## What type of PR?

bug-fix

## What does this PR do?

Don't check empty passwords against HIBP; Apparently some password managers will trigger a race condition otherwise

### Related issue(s)
- closes #3633

## Prerequisites
Before we can consider review and merge, please make sure the following list is done and checked.
If an entry in not applicable, you can check it or remove it from the list.

- [ ] In case of feature or enhancement: documentation updated accordingly
- [x] Unless it's docs or a minor change: add [changelog](https://mailu.io/master/contributors/workflow.html#changelog) entry file.
<hr>This is an automatic backport of pull request #3650 done by [Mergify](https://mergify.com).

Co-authored-by: Florent Daigniere <nextgens@freenetproject.org>
2024-11-17 20:20:11 +00:00
Florent Daigniere
1805ef4480 Don't check empty passwords against HIBP
(cherry picked from commit f1c5ac5b14)
2024-11-17 14:48:36 +00:00
bors-mailu[bot]
af5cbc92f2 Merge #3649
3649: Upgrade snappymail to v2.38.2 (backport #3648) r=mergify[bot] a=mergify[bot]

## What type of PR?

bug-fix

## What does this PR do?

Upgrade snappymail to v2.38.2. This is a security fix for [GHSA-2rq7-79vp-ffxm](https://github.com/the-djmaze/snappymail/security/advisories/GHSA-2rq7-79vp-ffxm) (mXSS)

### Related issue(s)

## Prerequisites
Before we can consider review and merge, please make sure the following list is done and checked.
If an entry in not applicable, you can check it or remove it from the list.

- [ ] In case of feature or enhancement: documentation updated accordingly
- [x] Unless it's docs or a minor change: add [changelog](https://mailu.io/master/contributors/workflow.html#changelog) entry file.
<hr>This is an automatic backport of pull request #3648 done by [Mergify](https://mergify.com).

Co-authored-by: Florent Daigniere <nextgens@freenetproject.org>
2024-11-17 14:47:40 +00:00
Florent Daigniere
37964c8d93 doh; v2.38.2
(cherry picked from commit 6f3257f3b2)
2024-11-17 12:34:22 +00:00
Florent Daigniere
59400f0f1b Upgrade snappymail to v2.38.2
(cherry picked from commit d4a3d5aeae)
2024-11-17 12:34:22 +00:00
bors-mailu[bot]
cfae470cbb Merge #3623
3623: alpine 3.20.3 (backport #3622) r=mergify[bot] a=mergify[bot]

## What type of PR?

bug-fix

## What does this PR do?

Upgrade from alpine 3.20.0 to alpine 3.20.3 ; We need a fix for [CVE-2024-5535](https://security.alpinelinux.org/vuln/CVE-2024-5535)

### Related issue(s)


## Prerequisites
Before we can consider review and merge, please make sure the following list is done and checked.
If an entry in not applicable, you can check it or remove it from the list.

- [ ] In case of feature or enhancement: documentation updated accordingly
- [x] Unless it's docs or a minor change: add [changelog](https://mailu.io/master/contributors/workflow.html#changelog) entry file.
<hr>This is an automatic backport of pull request #3622 done by [Mergify](https://mergify.com).

Co-authored-by: Florent Daigniere <nextgens@freenetproject.org>
2024-10-21 21:26:20 +00:00