diff --git a/requirements.txt b/requirements.txt index 6f17b1e..b73f8f1 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,46 +1,40 @@ # NOTE: Any requirements with environment specifiers must be explicitly added # to pkg/pip/setup_pip.py (in extras_require), otherwise they will be # ignored when building a PIP Wheel. -Babel==2.3.4 -beautifulsoup4==4.4.1 -blinker==1.3 -click==6.6 -extras==0.0.3 -fixtures==2.0.0 -Flask==0.11.1 -Flask-Babel==0.11.1 -Flask-Gravatar==0.4.2 -Flask-HTMLmin==1.2; python_version >= '2.7' +blinker==1.4 +extras==1.0.0 +fixtures==3.0.0 +Flask==0.12.2 +Flask-Babel==0.11.2 +Flask-Gravatar==0.5.0 +Flask-HTMLmin==1.3.2; python_version >= '2.7' Flask-Login==0.3.2 Flask-Mail==0.9.1 -Flask-Migrate==2.0.3 +Flask-Migrate==2.1.1 Flask-Principal==0.4.0 Flask-Security==1.7.5 -Flask-SQLAlchemy==2.1 +Flask-SQLAlchemy==2.3.2 Flask-WTF==0.12 -html5lib==1.0b3 +html5lib==1.0.1 importlib==1.0.3; python_version <= '2.7' -itsdangerous==0.24 -Jinja2==2.7.3 linecache2==1.0.0 -MarkupSafe==0.23 ordereddict; python_version < '2.7' -passlib==1.6.2 -pbr==1.9.1 -psycopg2>=2.7.3.2; python_version >= '2.7' +passlib==1.7.1 +pbr==3.1.1 +psycopg2>=2.7.4; python_version >= '2.7' psycopg2==2.7.3.2; python_version < '2.7' -pycrypto==2.6.1 -pyrsistent==0.11.13 -python-dateutil==2.5.0 -python-mimeparse==1.5.1 -pytz==2014.10 -simplejson==3.6.5 -six>=1.9.0 +pycrypto==2.6.1; python_version < '2.7' +pycryptodome; python_version >= '2.7' +pyrsistent==0.14.2 +python-dateutil==2.7.1 +python-mimeparse==1.6.0 +pytz==2018.3 +simplejson==3.13.2 +six>=1.11.0 speaklater==1.3 -SQLAlchemy==1.0.14 -sqlparse==0.1.19 -Werkzeug==0.9.6 -WTForms==2.0.2 -backports.csv==1.0.4; python_version <= '2.7' -Flask-Paranoid==0.1.0 +SQLAlchemy==1.2.5 +sqlparse==0.2.4 +WTForms==2.1 +backports.csv==1.0.5; python_version <= '2.7' +Flask-Paranoid==0.2.0 Flask-Script==2.0.5; python_version < '2.7' diff --git a/web/package.json b/web/package.json index 3ce86a1..27a71aa 100644 --- a/web/package.json +++ b/web/package.json @@ -1,7 +1,7 @@ { "license": "PostgreSQL", "devDependencies": { - "axios-mock-adapter": "^1.11.0", + "axios-mock-adapter": "^1.14.1", "babel-core": "~6.24.0", "babel-loader": "~7.1.2", "babel-preset-airbnb": "^2.4.0", @@ -40,21 +40,21 @@ "dependencies": { "acitree": "git+https://github.com/imsurinder90/jquery-aciTree.git#rc.7", "alertifyjs": "^1.10.0", - "axios": "^0.16.1", + "axios": "^0.18.0", "babel-plugin-transform-es2015-modules-amd": "^6.24.1", "babel-polyfill": "^6.23.0", "babel-preset-es2015-without-strict": "~0.0.4", "babelify": "~7.3.0", - "backbone": "1.1.2", + "backbone": "1.3.3", "backform": "^0.2.0", "backgrid": "^0.3.8", "backgrid-filter": "^0.3.7", "backgrid-select-all": "^0.3.5", "backgrid-sizeable-columns": "^0.1.1", - "bignumber.js": "^4.0.2", + "bignumber.js": "^6.0.0", "bootstrap": "^3.3.7", "bootstrap-datepicker": "^1.7.0", - "bootstrap-switch": "3.3.2", + "bootstrap-switch": "3.3.4", "bowser": "1.6.1", "browserify": "~14.1.0", "codemirror": "^5.29.0", @@ -70,7 +70,7 @@ "imports-loader": "^0.7.1", "ip-address": "^5.8.9", "jquery": "1.11.2", - "jquery-contextmenu": "^2.5.0", + "jquery-contextmenu": "^2.6.4", "jquery-ui": "^1.12.1", "moment": "^2.20.1", "mousetrap": "^1.6.1", @@ -79,9 +79,9 @@ "react-dom": "^16.2.0", "react-split-pane": "^0.1.63", "requirejs": "~2.3.3", - "select2": "^4.0.3", + "select2": "^4.0.6-rc.1", "shim-loader": "^1.0.1", - "slickgrid": "git+https://github.com/6pac/SlickGrid.git#2.3.7", + "slickgrid": "git+https://github.com/6pac/SlickGrid.git#2.3.16", "snapsvg": "^0.5.1", "spectrum-colorpicker": "^1.8.0", "underscore": "^1.8.3", diff --git a/web/pgadmin/utils/crypto.py b/web/pgadmin/utils/crypto.py index 07833d4..def3d68 100644 --- a/web/pgadmin/utils/crypto.py +++ b/web/pgadmin/utils/crypto.py @@ -28,11 +28,11 @@ def encrypt(plaintext, key): """ iv = Random.new().read(AES.block_size) - cipher = AES.new(pad(key), AES.MODE_CFB, iv) + key = pad(key).encode('utf-8') + cipher = AES.new(key, 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') + plaintext = plaintext.encode('utf-8') encrypted = base64.b64encode(iv + cipher.encrypt(plaintext)) return encrypted @@ -51,32 +51,33 @@ def decrypt(ciphertext, key): ciphertext = base64.b64decode(ciphertext) iv = ciphertext[:AES.block_size] - cipher = AES.new(pad(key), AES.MODE_CFB, iv) + key = pad(key).encode('utf-8') + cipher = AES.new(key, AES.MODE_CFB, iv) decrypted = cipher.decrypt(ciphertext[AES.block_size:]) return decrypted -def pad(str): +def pad(key): """Add padding to the key.""" global padding_string - str_len = len(str) + str_len = len(key) # Key must be maximum 32 bytes long, so take first 32 bytes if str_len > 32: - return str[:32] + return key[:32] # If key size id 16, 24 or 32 bytes then padding not require if str_len == 16 or str_len == 24 or str_len == 32: - return str + return key # Convert bytes to string (python3) if not hasattr(str, 'decode'): padding_string = padding_string.decode() # Add padding to make key 32 bytes long - return str + ((32 - len(str) % 32) * padding_string) + return key + ((32 - str_len % 32) * padding_string) def pqencryptpassword(password, user): diff --git a/web/regression/requirements.txt b/web/regression/requirements.txt index fa61d2e..2e68c25 100644 --- a/web/regression/requirements.txt +++ b/web/regression/requirements.txt @@ -7,11 +7,11 @@ # Add all the development dependencies here ########################################### pycodestyle==2.3.1 -pyperclip~=1.5.27 +pyperclip~=1.6.0 selenium==3.3.3; python_version < '2.7' -selenium==3.7.0; python_version >= '2.7' +selenium==3.11.0; python_version >= '2.7' testscenarios==0.5.0 -testtools==2.0.0 +testtools==2.3.0 traceback2==1.4.0 unittest2==1.1.0 mock===2.0.0; python_version < '3.3'