labd / wagtail-2fa

2 Factor Authentication for Wagtail

Home Page:https://wagtail-2fa.readthedocs.io/en/latest/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Issues with QR Code not generating

mattmillen888 opened this issue · comments

Hi There, we have just install this locally on a dev project. (Love the Idea of this by the way) however for some reason when i click manage 2fa on a user(site.com/admin/2fa/devices/new) the QR Code is not generating and shows as a broken link. can you think why this might be?

screen shot 2018-05-29 at 10 26 26

Hi,

The image is rendered from the url http://127.0.0.1:8000/cms/2fa/devices/qr-code - so it probably gives an error, including a stacktrace. Could you paste that?

Also, for a working example project, please see the sandox directory in the repository. You can run the sandbox by running make sandbox from the project root.

Hey Pim, Thanks for the quick response.

[29/May/2018 09:46:13] "GET /admin/2fa/devices/new HTTP/1.1" 200 12367
[29/May/2018 09:46:13] "GET /assets/wagtailadmin/css/core.css HTTP/1.1" 200 77729
[29/May/2018 09:46:13] "GET /admin/2fa/devices/qr-code HTTP/1.1" 200 0
Traceback (most recent call last):
File "/usr/lib/python3.5/wsgiref/handlers.py", line 138, in run
self.finish_response()
File "/usr/lib/python3.5/wsgiref/handlers.py", line 180, in finish_response
self.write(data)
File "/usr/lib/python3.5/wsgiref/handlers.py", line 279, in write
self._write(data)
File "/usr/lib/python3.5/wsgiref/handlers.py", line 453, in _write
result = self.stdout.write(data)
File "/usr/lib/python3.5/socket.py", line 593, in write
return self._sock.send(b)
File "/usr/lib/python3.5/ssl.py", line 861, in send
return self._sslobj.write(data)
File "/usr/lib/python3.5/ssl.py", line 586, in write
return self._sslobj.write(data)
ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:1844)
[29/May/2018 09:46:13] "GET /admin/2fa/devices/qr-code HTTP/1.1" 500 59
Traceback (most recent call last):
File "/usr/lib/python3.5/wsgiref/handlers.py", line 138, in run
self.finish_response()
File "/usr/lib/python3.5/wsgiref/handlers.py", line 180, in finish_response
self.write(data)
File "/usr/lib/python3.5/wsgiref/handlers.py", line 279, in write
self._write(data)
File "/usr/lib/python3.5/wsgiref/handlers.py", line 453, in _write
result = self.stdout.write(data)
File "/usr/lib/python3.5/socket.py", line 593, in write
return self._sock.send(b)
File "/usr/lib/python3.5/ssl.py", line 861, in send
return self._sslobj.write(data)
File "/usr/lib/python3.5/ssl.py", line 586, in write
return self._sslobj.write(data)
ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:1844)

Django==1.11
wagtail==2.1
wagtail-2fa==1.0.0

Currently wagtail-2fa is only tested against Python3.6, not 3.5. So upgrading might solve it.

Seems to be a problem with your SSL binary.

This thread might include a solution, in case using 3.6 does not work.: psf/requests#3006

Hey Pim, Thanks so much for the useful insight, that worked great!