Date: Friday, February 8, 2019 @ 01:44:56 Author: anthraxx Revision: 430411
upgpkg: pgadmin4 4.2-1 Modified: pgadmin4/trunk/PKGBUILD Deleted: pgadmin4/trunk/pgadmin4-compatibility-with-python3-pycryptodome.patch --------------------------------------------------------+ PKGBUILD | 9 +-- pgadmin4-compatibility-with-python3-pycryptodome.patch | 45 --------------- 2 files changed, 3 insertions(+), 51 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2019-02-07 23:53:01 UTC (rev 430410) +++ PKGBUILD 2019-02-08 01:44:56 UTC (rev 430411) @@ -2,7 +2,7 @@ # Maintainer: Jerome Leclanche <[email protected]> pkgname=pgadmin4 -pkgver=4.1 +pkgver=4.2 pkgrel=1 pkgdesc='Comprehensive design and management interface for PostgreSQL' url='https://www.pgadmin.org/' @@ -15,7 +15,7 @@ 'python-passlib' 'python-mimeparse' 'python-pytz' 'python-simplejson' 'python-six' 'python-speaklater' 'python-sqlparse' 'python-wtforms' 'python-psutil' 'python-jinja' 'python-paramiko' 'python-psycopg2' - 'python-pycryptodome' 'python-sqlalchemy' 'python-testtools' + 'python-cryptography' 'python-sqlalchemy' 'python-testtools' 'python-webencodings' 'python-werkzeug' 'python-dateutil' 'python-pyrsistent' 'python-pbr' 'python-flask-gravatar' 'python-flask-mail' 'python-flask-principal' 'python-flask-paranoid' @@ -26,21 +26,18 @@ pgAdmin4.desktop config_distro.py config_local.py - pgadmin4-compatibility-with-python3-pycryptodome.patch pgadmin4-python-de-vendor-venv-paths.patch) validpgpkeys=('E8697E2EEF76C02D3A6332778881B2A8210976F2') # Package Manager (Package Signing Key) <[email protected]> -sha512sums=('8c690ae67416b78d19988a4f0c9ec788340cadd347cb33f6e436f2d6627708f5a1d3f05daf4bcdb2824d79315fc49edd76d9e815ad7185632e15b623fd9e4659' +sha512sums=('d3d242904c65f0af871890954c24005b4849b88599cde9a7cb82e077ff5db5a8c5f015c4af0b135d68f02daad42492af71373831c2212a36672af8d7621c3b2a' 'SKIP' 'b19dda3331585010c759099eb09f4db288ce4cd3d36882b56748e1e3756dc7bee2899d7438d496280498ec6a60f6e1ba90309d49fc599403f1fdc7e8817b6645' '16d00dc2095904a6b12da7039458f632873829ad98d4d7653eac5804032ba92097ccae4488d56467d0ea9bd64e2654a3dead73eb7924c947ff1737ff6e3b4745' 'cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e' - '37f47723ed4ce4a2fef5e400eefb77a3c5dfe8e51ba749dad1c91c403379a02b0bfdf78086bd9fc33c5e9e6fbe8462f7b6103bcfb992ba0c3dcfca919d9eb985' '70c8e589421ab50cf81753fbcfb5df65669b0feeefa3a57ee574b3785424fd107af720fc7007e52876798a46fae88f2c02dbf156aa096397afa0f85ac04fdb76') prepare() { cd ${pkgname}-${pkgver} - patch -Np1 < ../pgadmin4-compatibility-with-python3-pycryptodome.patch patch -Np1 < ../pgadmin4-python-de-vendor-venv-paths.patch local PYTHONVERSION="$(python -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")')" Deleted: pgadmin4-compatibility-with-python3-pycryptodome.patch =================================================================== --- pgadmin4-compatibility-with-python3-pycryptodome.patch 2019-02-07 23:53:01 UTC (rev 430410) +++ pgadmin4-compatibility-with-python3-pycryptodome.patch 2019-02-08 01:44:56 UTC (rev 430411) @@ -1,45 +0,0 @@ -From 058fe07217d40551195f0d54e9f76c9a20c13d91 Mon Sep 17 00:00:00 2001 -From: anthraxx <[email protected]> -Date: Tue, 13 Nov 2018 17:54:21 +0100 -Subject: [PATCH] compatibility with python3 pycryptodome - ---- - web/pgadmin/utils/crypto.py | 4 ++-- - web/pgadmin/utils/driver/psycopg2/connection.py | 2 +- - 2 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/web/pgadmin/utils/crypto.py b/web/pgadmin/utils/crypto.py -index 8350f7a1..74633493 100644 ---- a/web/pgadmin/utils/crypto.py -+++ b/web/pgadmin/utils/crypto.py -@@ -28,12 +28,12 @@ def encrypt(plaintext, key): - """ - - iv = Random.new().read(AES.block_size) -- cipher = AES.new(pad(key), AES.MODE_CFB, iv) -+ cipher = AES.new(pad(key.encode('utf-8')), AES.MODE_CFB, iv) - # If user has entered non ascii password (Python2) - # we have to encode it first - if hasattr(str, 'decode'): - plaintext = plaintext.encode('utf-8') -- encrypted = base64.b64encode(iv + cipher.encrypt(plaintext)) -+ encrypted = base64.b64encode(iv + cipher.encrypt(plaintext.encode('utf-8'))) - - return encrypted - -diff --git a/web/pgadmin/utils/driver/psycopg2/connection.py b/web/pgadmin/utils/driver/psycopg2/connection.py -index 4f11c12b..e5fdd31f 100644 ---- a/web/pgadmin/utils/driver/psycopg2/connection.py -+++ b/web/pgadmin/utils/driver/psycopg2/connection.py -@@ -256,7 +256,7 @@ class Connection(BaseConnection): - return False, gettext("Unauthorized request.") - - try: -- password = decrypt(encpass, user.password) -+ password = decrypt(encpass, user.password.encode('utf-8')) - # Handling of non ascii password (Python2) - if hasattr(str, 'decode'): - password = password.decode('utf-8').encode('utf-8') --- -2.19.1 -
