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.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan