Le lundi 03 janvier 2022 à 16:55:37+0100, Harald Welte a écrit :
> Package: python3-django-allauth
> Version: 0.44.0+ds-1
> Severity: normal
> 
> I'm running a bullseye installation with mailman3-web and wanted to enable 
> openid
> authentication via the python3-django-allouth package.  However, when using 
> it,
> I get the following exception / backtrace:
> 
> ERROR:django.request:Internal Server Error: /accounts/openid/login/
> Traceback (most recent call last):
>   File "/usr/lib/python3/dist-packages/django/core/handlers/exception.py", 
> line 34, in inner
>     response = get_response(request)
>   File "/usr/lib/python3/dist-packages/django/core/handlers/base.py", line 
> 115, in _get_response
>     response = self.process_exception_by_middleware(e, request)
>   File "/usr/lib/python3/dist-packages/django/core/handlers/base.py", line 
> 113, in _get_response
>     response = wrapped_callback(request, *callback_args, **callback_kwargs)
>   File "/usr/lib/python3/dist-packages/django/views/generic/base.py", line 
> 71, in view
>     return self.dispatch(request, *args, **kwargs)
>   File "/usr/lib/python3/dist-packages/django/views/generic/base.py", line 
> 97, in dispatch
>     return handler(request, *args, **kwargs)
>   File 
> "/usr/lib/python3/dist-packages/allauth/socialaccount/providers/openid/views.py",
>  line 45, in get
>     return self.perform_openid_auth(form)
>   File 
> "/usr/lib/python3/dist-packages/allauth/socialaccount/providers/openid/views.py",
>  line 94, in perform_openid_auth
>     auth_request = client.begin(endpoint)
>   File "/usr/lib/python3/dist-packages/openid/consumer/consumer.py", line 
> 359, in begin
>     return self.beginWithoutDiscovery(service, anonymous)
>   File "/usr/lib/python3/dist-packages/openid/consumer/consumer.py", line 
> 382, in beginWithoutDiscovery
>     auth_req = self.consumer.begin(service)
>   File "/usr/lib/python3/dist-packages/openid/consumer/consumer.py", line 
> 610, in begin
>     assoc = self._getAssociation(service_endpoint)
>   File "/usr/lib/python3/dist-packages/openid/consumer/consumer.py", line 
> 1178, in _getAssociation
>     assoc = self.store.getAssociation(endpoint.server_url)
>   File 
> "/usr/lib/python3/dist-packages/allauth/socialaccount/providers/openid/utils.py",
>  line 105, in getAssociation
>     base64.decodestring(stored_assoc.secret.encode("utf-8")),
> AttributeError: module 'base64' has no attribute 'decodestring'
> 
> 
> It seems like base64.decodestring() has been deprecated since python 3.8 but 
> somehow this module
> has not been updated.
> 
> Upstream has a fix in 
> https://github.com/pennersr/django-allauth/commit/425dc774fb5d032204b92f0870c3802202259ad3

Thanks for your bug report!

I've applied that commit in 0.47.0. As soon as it enters testing, I'll
do a stable-pu to have it in the next bullseye minor release.

With best regards,

-- 
Pierre-Elliott Bécue
GPG: 9AE0 4D98 6400 E3B6 7528  F493 0D44 2664 1949 74E2
It's far easier to fight for principles than to live up to them.

Attachment: signature.asc
Description: PGP signature

Reply via email to