Skip to content

Conversation

@patchedsoul
Copy link

@patchedsoul patchedsoul commented Feb 4, 2021

I resolved some minor string handling that was causing trace backs to be thrown. I reformatted the code to be pep8 compliant too. Since I was submitting this PR, I also swapped the now unmaintained 'pycrypto' for the drop-in replacement, 'pycryptodome'.

- swapped pycrypto for pycryptodome due to the former not being maintained any longer
- swapped pycrypto for pycryptodome due to the former not being maintained any longer
@m0ngr31
Copy link
Owner

m0ngr31 commented Feb 4, 2021

Thanks for submitting a PR 🙂

Does this maintain compatibility with Python 2? If not, could you also update the readme?

@m0ngr31
Copy link
Owner

m0ngr31 commented Feb 4, 2021

Also I know PEP8 prefers 4 spaces, but it's too ugly for me. I'd prefer 2 spaces - easier to see what else has changed too :)

@m0ngr31
Copy link
Owner

m0ngr31 commented Feb 27, 2021

@patchedsoul do you mind responding?

@Michaelpalacce
Copy link

Michaelpalacce commented Mar 27, 2022

Is there any progress here? I am having the same issue.

@m0ngr31 is there a workaround?

@SystemFiles
Copy link

SystemFiles commented Feb 7, 2023

Also wondering if there is a workaround. I can't get the app to work at all using the provided docker-compose.

Tagging: @m0ngr31

ValueError: IV must be 16 bytes long
server_1  | [2023-02-07 14:41:26,975] ERROR in app: Exception on /api/save_day [PUT]
server_1  | Traceback (most recent call last):
server_1  |   File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 2525, in wsgi_app
server_1  |     response = self.full_dispatch_request()
server_1  |   File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1822, in full_dispatch_request
server_1  |     rv = self.handle_user_exception(e)
server_1  |   File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1820, in full_dispatch_request
server_1  |     rv = self.dispatch_request()
server_1  |   File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1796, in dispatch_request
server_1  |     return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
server_1  |   File "/usr/local/lib/python3.8/site-packages/flask_jwt_extended/view_decorators.py", line 154, in decorator
server_1  |     return current_app.ensure_sync(fn)(*args, **kwargs)
server_1  |   File "/app/app/routes.py", line 73, in save_day
server_1  |     enc_date = aes_encrypt(title)
server_1  |   File "/app/app/models.py", line 18, in aes_encrypt
server_1  |     cipher = AES.new(key, AES.MODE_CFB, key[::-1])
server_1  |   File "/usr/local/lib/python3.8/site-packages/Crypto/Cipher/AES.py", line 95, in new
server_1  |     return AESCipher(key, *args, **kwargs)
server_1  |   File "/usr/local/lib/python3.8/site-packages/Crypto/Cipher/AES.py", line 59, in __init__
server_1  |     blockalgo.BlockAlgo.__init__(self, _AES, key, *args, **kwargs)
server_1  |   File "/usr/local/lib/python3.8/site-packages/Crypto/Cipher/blockalgo.py", line 141, in __init__
server_1  |     self._cipher = factory.new(key, *args, **kwargs)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants