Hello, I have been developing a new plugin for CTFd. It allows for authentication over LDAP.
Hi, In docker, return this error.
ctfd_1 | Traceback (most recent call last):
ctfd_1 | File "manage.py", line 9, in
ctfd_1 | app = create_app()
ctfd_1 | File "/opt/CTFd/CTFd/init.py", line 281, in create_app
ctfd_1 | init_plugins(app)
ctfd_1 | File "/opt/CTFd/CTFd/plugins/init.py", line 195, in init_plugins
ctfd_1 | module = importlib.import_module(module, package="CTFd.plugins")
ctfd_1 | File "/usr/local/lib/python3.7/importlib/init.py", line 127, in import_module
ctfd_1 | return _bootstrap._gcd_import(name[level:], package, level)
ctfd_1 | File "", line 1006, in _gcd_import
ctfd_1 | File "", line 983, in _find_and_load
ctfd_1 | File "", line 967, in _find_and_load_unlocked
ctfd_1 | File "", line 677, in _load_unlocked
ctfd_1 | File "", line 728, in exec_module
ctfd_1 | File "", line 219, in _call_with_frames_removed
ctfd_1 | File "/opt/CTFd/CTFd/plugins/CTFd-Ldap/init.py", line 10, in
ctfd_1 | import ldap3
ctfd_1 | ModuleNotFoundError: No module named 'ldap3'
Sep 10
'20 05:09
sep3
@sep3
You need to install ldap3 to use my plugin. It should get installed automatically for regular use, but if you are running ctfd as a container you need to add ldap3 to the pip install in the dockerfile
It's installed.
RUN pip install ldap3
RUN pip install CTFd/plugins/CTFd-Ldap/ldap3-2.8.1-py2.py3-none-any.whl;
Successfully installed ldap3-2.8.1 pyasn1-0.4.8
but for some reason it still doesn't recognize ldap3
Sep 10
'20 13:09
sep3
@sep3
Weird, I haven't tried to use this plugin with docker myself. Maybe you are installing it with pip for root user and then running it with another user?