Hello Mark,

THANK You for identifying MY typos.... how embarrassing. :-)
Now ist running like a charm.
It's always the same...

These Variables are setting the internal Values via the docker-compose.yml.
If they do not match, the internal variables are not set.
Therefor my typo  H*A*YPERKITTY_API_KEY =! HYPERKITTY_API_KEY caused,
that the mailman-web section of the docker-compose.yml had NO Hyperkitty API- KEY. I suspected something like that, that's why i set the key via the .env variabels to ensure
identical values in all sections oft the docker.compose.yml.
I didn't check the name of the variables...

Thx again!

Best wishes
Helge

Ps.:

That docker-compose.yml with the settings_locale.py and mailman_extra.cfg basically setts a complete deployable environment INCLUDING the MTA,
which is independent of the host...



Am 22.01.2025 um 06:36 schrieb Mark Sapiro:

On 1/21/25 05:44, Helge Baumgart wrote:

Hyperkitty-Api-Key in the docker-compose.yml is set via .env Variabel, so it should be identical.


I don't know how this works in the Docker image, but ...

Traceback (most recent call last):
   File "/usr/lib/python3.11/site-packages/django/core/handlers/exception.py", line 56, in inner
     response = get_response(request)
   File "/usr/lib/python3.11/site-packages/django/core/handlers/base.py", line 197, in _get_response      response = wrapped_callback(request, *callback_args, **callback_kwargs)    File "/usr/lib/python3.11/site-packages/hyperkitty/views/mailman.py", line 109, in _decorator
     not hmac.compare_digest(

Exception Type: TypeError at /hyperkitty/api/mailman/urls
Exception Value: unsupported operand types(s) or combination of types: 'str' and 'NoneType'

The above code is doing

        auth = authorization.split()
        if (len(auth) != 2 or auth[0] != 'Token' or
                not hmac.compare_digest(
                    auth[1], settings.MAILMAN_ARCHIVER_KEY)):


and the exception says either auth[0] is None or auth[1] or settings.MAILMAN_ARCHIVER_KEY is None.

But

META:
...
HTTP_AUTHORIZATION = 'Token (value)'
and

Settings:
Using settings module settings
...
MAILMAN_ARCHIVER_KEY = '********************'

So The Authorization header is the appropriate `Token value` which should result in auth[0] being 'Token', auth[1] being the value and MAILMAN_ARCHIVER_KEY is set

That is my docker-compose.yml:
...
   mailman-web:
...
     - HAYPERKITTY_API_KEY=${MM3_HYPERKITTY_API_KEY} #someapikey_longAndTrustworty


I don't really understand why the above typo (HAYPERKITTY_API_KEY, not HYPERKITTY_API_KEY) would cause this error, but it needs to be fixed.

_______________________________________________
Mailman-users mailing list -- mailman-users@mailman3.org
To unsubscribe send an email to mailman-users-le...@mailman3.org
https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/
Archived at: 
https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/message/IDUHA5CPJPE7CLWOHPFC3RVVWATUEUWT/

This message sent to arch...@mail-archive.com

Reply via email to