Re: [pgAdmin4] Changes required to support PyCrypto - Mailing list pgadmin-hackers
From | Murtuza Zabuawala |
---|---|
Subject | Re: [pgAdmin4] Changes required to support PyCrypto |
Date | |
Msg-id | CAKKotZSwSPgxsVWNfxrKx_wCaeoAEOryhXkjYHH3MJRV-spLqQ@mail.gmail.com Whole thread Raw |
In response to | Re: [pgAdmin4] Changes required to support PyCrypto (Dave Page <dpage@pgadmin.org>) |
Responses |
Re: [pgAdmin4] Changes required to support PyCrypto
|
List | pgadmin-hackers |
This is the exact code we had before pycrptodom changes, Is it fresh virtual environment?
I suspect some conflicts from pycrptodom files.
--
Regards,
On Tue, Apr 10, 2018 at 9:51 PM, Dave Page <dpage@pgadmin.org> wrote:
On Tue, Apr 10, 2018 at 4:51 PM, Dave Page <dpage@pgadmin.org> wrote:*grumble*. Thanks, applied.And reverted. When I went back to 2.7, it got very upset:ERRORrunTest (pgadmin.browser.server_groups.servers.databases. schemas.tables.tests.test_ table_put.TableUpdateTestCase) Create partitions of existing range partitioned table ... 2018-04-10 17:10:57,703: ERROR pgadmin: Object type <type 'unicode'> cannot be passed to C codeTraceback (most recent call last):File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_ groups/servers/__init__.py", line 962, in connect if password is not None else server.passwordFile "/Users/dpage/git/pgadmin4/web/pgadmin/utils/crypto.py", line 31, in encrypt cipher = AES.new(pad(key), AES.MODE_CFB, iv)File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site- packages/Crypto/Cipher/AES.py" , line 200, in new return _create_cipher(sys.modules[__name__], key, mode, *args, **kwargs) File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site- packages/Crypto/Cipher/__init_ _.py", line 55, in _create_cipher return modes[mode](factory, **kwargs)File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site- packages/Crypto/Cipher/_mode_ cfb.py", line 230, in _create_cfb_cipher cipher_state = factory._create_base_cipher(kwargs) File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site- packages/Crypto/Cipher/AES.py" , line 100, in _create_base_cipher result = start_operation(c_uint8_ptr(key), File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site- packages/Crypto/Util/_raw_api. py", line 151, in c_uint8_ptr raise TypeError("Object type %s cannot be passed to C code" % type(data))TypeError: Object type <type 'unicode'> cannot be passed to C codeOn Tue, Apr 10, 2018 at 1:52 PM, Murtuza Zabuawala <murtuza.zabuawala@enterprisedb.com> wrote: On Tue, Apr 10, 2018 at 12:49 PM, Murtuza Zabuawala <murtuza.zabuawala@enterprisedb.com> wrote: Hi,Please find patch to revert back the changes we have made for pycryptodom module, This will fix encrypt & decrypt functionality in python3.Wait, what? Are you telling me that encrypt/decrypt is broken under Python 3 in the builds I've just pushed?Only if user's password contains non-ascii characters and running on Python3.--Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company--Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company--Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
pgadmin-hackers by date: