Closed ingoratsdorf closed 1 month ago
Thansk @ingoratsdorf , just pushed a quick fix, renamed cryptography.py
to crypto_utils.py
- hope this solves it.
That should solve it indeed. But from the looks, you don't seem to be needing cryptography anywhere?
I'm using (as far as I remember lol) the library to encrypt and decrypt data for the SYNC
plugin to communicate between 2 NetAlertX instances. Maybe I don't have to do it and there is an easier way - open to PRs/suggestions.
Nah, I checked the source code and you are only using it in:
The reference in \server\cryptography.py to fernet is commented out
Soooo, not in use ;-)
Ha - true - thanks, removed :)
Is there an existing issue for this?
Current Behavior
the current install script install the pypi cryptography module that seem to be clashing with the cryptography file in /app/server:
ImportError: cannot import name 'decrypt_data' from 'cryptography' (/myenv/lib/python3.12/site-packages/cryptogra> Sep 27 01:26:46 netalertx rc.local[676]: from cryptography import decrypt_data Sep 27 01:26:46 netalertx rc.local[676]: File "/app/server/plugin_utils.py", line 8, in
Sep 27 01:26:46 netalertx rc.local[676]: from plugin_utils import getPluginObject
Sep 27 01:26:46 netalertx rc.local[676]: File "/app/front/plugins/_publisher_mqtt/mqtt.py", line 26, in
Expected Behavior
No error
Steps To Reproduce
Use bare metal installer, run start script, watch logs and see above error.
If I remove cryptography and empty all python caches, all runs normal. The 'decrypt_data' procedure is not defined in the pip3 install, only in the handcrafted version in /app/server/cryptography.py
app.conf
No response
docker-compose.yml
What branch are you running?
Production
app.log
No response
Debug enabled