diff --git a/pkg/osx/build_env.sh b/pkg/osx/build_env.sh index 1e9defa1f4..71f716b38c 100755 --- a/pkg/osx/build_env.sh +++ b/pkg/osx/build_env.sh @@ -177,8 +177,8 @@ $MAKE install ############################################################################ echo -n -e "\033]0;Build_Env: libsodium: download\007" -PKGURL="https://download.libsodium.org/libsodium/releases/libsodium-1.0.15.tar.gz" -PKGDIR="libsodium-1.0.15" +PKGURL="https://download.libsodium.org/libsodium/releases/libsodium-1.0.17.tar.gz" +PKGDIR="libsodium-1.0.17" download $PKGURL @@ -200,8 +200,8 @@ $MAKE install ############################################################################ echo -n -e "\033]0;Build_Env: zeromq: download\007" -PKGURL="http://download.zeromq.org/zeromq-4.1.4.tar.gz" -PKGDIR="zeromq-4.1.4" +PKGURL="https://github.com/zeromq/zeromq4-1/releases/download/v4.1.6/zeromq-4.1.6.tar.gz" +PKGDIR="zeromq-4.1.6" download $PKGURL @@ -223,8 +223,8 @@ $MAKE install ############################################################################ echo -n -e "\033]0;Build_Env: OpenSSL: download\007" -PKGURL="http://openssl.org/source/openssl-1.0.2p.tar.gz" -PKGDIR="openssl-1.0.2p" +PKGURL="http://openssl.org/source/openssl-1.0.2q.tar.gz" +PKGDIR="openssl-1.0.2q" download $PKGURL @@ -247,11 +247,11 @@ $MAKE install echo -n -e "\033]0;Build_Env: Python: download\007" if [ "$PYVER" == "2" ]; then - PKGURL="https://www.python.org/ftp/python/2.7.14/Python-2.7.14.tar.xz" - PKGDIR="Python-2.7.14" + PKGURL="https://www.python.org/ftp/python/2.7.15/Python-2.7.15.tar.xz" + PKGDIR="Python-2.7.15" else - PKGURL="https://www.python.org/ftp/python/3.5.3/Python-3.5.3.tar.xz" - PKGDIR="Python-3.5.3" + PKGURL="https://www.python.org/ftp/python/3.5.4/Python-3.5.4.tar.xz" + PKGDIR="Python-3.5.4" fi download $PKGURL diff --git a/pkg/osx/req.txt b/pkg/osx/req.txt index 764aae3bf4..b470e89222 100644 --- a/pkg/osx/req.txt +++ b/pkg/osx/req.txt @@ -1,32 +1,32 @@ -apache-libcloud==2.2.1 -backports.ssl_match_hostname==3.5.0.1 +apache-libcloud==2.4.0 +backports.ssl_match_hostname==3.7.0.1 backports_abc==0.5 certifi cffi==1.11.2 -CherryPy==13.0.0 -click==6.7 +CherryPy==17.4.1 +click==7.0 enum34==1.1.6 -futures==3.1.1 +futures==3.2.0; python_version == '2.7' gitdb==0.6.4 -GitPython==2.1.7 -idna==2.6 -ipaddress==1.0.18 +GitPython==2.1.10 +idna==2.8 +ipaddress==1.0.22 Jinja2==2.10 linode-python==1.1.1 Mako==1.0.7 -MarkupSafe==1.0 -msgpack-python==0.4.8 -pyasn1==0.4.2 -pycparser==2.18 +MarkupSafe==1.1.0 +msgpack-python==0.5.6 +pyasn1==0.4.5 +pycparser==2.19 pycrypto==2.6.1 -python-dateutil==2.6.1 -python-gnupg==0.4.1 -PyYAML==3.12 -pyzmq==17.0.0 +pyobjc==5.1.2 +python-dateutil==2.7.5 +python-gnupg==0.4.3 +PyYAML==3.13 +pyzmq==17.1.2 requests==2.21.0 singledispatch==3.4.0.3 -six==1.11.0 smmap==0.9.0 timelib==0.2.4 -tornado==4.5.2 -vultr==1.0rc1 +tornado==4.5.3 +vultr==1.0.1 diff --git a/pkg/osx/req_ext.txt b/pkg/osx/req_ext.txt index df6232bab3..68a1941158 100644 --- a/pkg/osx/req_ext.txt +++ b/pkg/osx/req_ext.txt @@ -1,2 +1,2 @@ -cryptography==2.1.4 -pyOpenSSL==17.5.0 +cryptography==2.4.2 +pyOpenSSL==18.0.0 diff --git a/pkg/osx/shasums/Python-2.7.14.tar.xz.sha512 b/pkg/osx/shasums/Python-2.7.14.tar.xz.sha512 deleted file mode 100644 index 1e4d88234b..0000000000 --- a/pkg/osx/shasums/Python-2.7.14.tar.xz.sha512 +++ /dev/null @@ -1 +0,0 @@ -78310b0be6388ffa15f29a80afb9ab3c03a572cb094e9da00cfe391afadb51696e41f592eb658d6a31a2f422fdac8a55214a382cbb8cfb43d4a127d5b35ea7f9 ./Python-2.7.14.tar.xz diff --git a/pkg/osx/shasums/Python-2.7.15.tar.xz.sha512 b/pkg/osx/shasums/Python-2.7.15.tar.xz.sha512 new file mode 100644 index 0000000000..7227ff1751 --- /dev/null +++ b/pkg/osx/shasums/Python-2.7.15.tar.xz.sha512 @@ -0,0 +1 @@ +27ea43eb45fc68f3d2469d5f07636e10801dee11635a430ec8ec922ed790bb426b072da94df885e4dfa1ea8b7a24f2f56dd92f9b0f51e162330f161216bd6de6 ./Python-2.7.15.tar.xz diff --git a/pkg/osx/shasums/Python-3.5.3.tar.xz.sha512 b/pkg/osx/shasums/Python-3.5.3.tar.xz.sha512 deleted file mode 100644 index d4ab61d5f7..0000000000 --- a/pkg/osx/shasums/Python-3.5.3.tar.xz.sha512 +++ /dev/null @@ -1 +0,0 @@ -bbcc20e315c63dbc8901d7e7bfa29d4dbdad9335720757d8d679730319fd1d9fcfdb55cf62d620c9b052134170f162c28d653a8af60923185b8932524d827864 ./Python-3.5.3.tar.xz diff --git a/pkg/osx/shasums/Python-3.5.4.tar.xz.sha512 b/pkg/osx/shasums/Python-3.5.4.tar.xz.sha512 new file mode 100644 index 0000000000..1a9437e0b5 --- /dev/null +++ b/pkg/osx/shasums/Python-3.5.4.tar.xz.sha512 @@ -0,0 +1 @@ +dbbe2740ee1cce5404b7b6436a9b3887e15f415a1006efa22014ec7e5b1e48c43eed0ff98f6f5b365c527b8d2525be4ce72bbe404ce71c0835529fcd6f0267ff ./Python-3.5.4.tar.xz diff --git a/pkg/osx/shasums/libsodium-1.0.15.tar.gz.sha512 b/pkg/osx/shasums/libsodium-1.0.15.tar.gz.sha512 deleted file mode 100644 index b1ba8d049a..0000000000 --- a/pkg/osx/shasums/libsodium-1.0.15.tar.gz.sha512 +++ /dev/null @@ -1 +0,0 @@ -299a208f8342793d13498e95b23f1749f5b5b13ec276db3ec401130615e837ef475b6a1283b6e87a5f8227d23e70e38ca721073dadd5dc88fe4aff342aa64adc ./libsodium-1.0.15.tar.gz diff --git a/pkg/osx/shasums/libsodium-1.0.17.tar.gz.sha512 b/pkg/osx/shasums/libsodium-1.0.17.tar.gz.sha512 new file mode 100644 index 0000000000..f470b5f2e7 --- /dev/null +++ b/pkg/osx/shasums/libsodium-1.0.17.tar.gz.sha512 @@ -0,0 +1 @@ +7cc9e4f11e656008ce9dff735acea95acbcb91ae4936de4d26f7798093766a77c373e9bd4a7b45b60ef8a11de6c55bc8dcac13bebf8c23c671d0536430501da1 ./libsodium-1.0.17.tar.gz diff --git a/pkg/osx/shasums/openssl-1.0.2p.tar.gz.sha512 b/pkg/osx/shasums/openssl-1.0.2p.tar.gz.sha512 deleted file mode 100644 index 11b018cfe7..0000000000 --- a/pkg/osx/shasums/openssl-1.0.2p.tar.gz.sha512 +++ /dev/null @@ -1 +0,0 @@ -958c5a7c3324bbdc8f07dfb13e11329d9a1b4452c07cf41fbd2d42b5fe29c95679332a3476d24c2dc2b88be16e4a24744aba675a05a388c0905756c77a8a2f16 ./openssl-1.0.2p.tar.gz diff --git a/pkg/osx/shasums/openssl-1.0.2q.tar.gz.sha512 b/pkg/osx/shasums/openssl-1.0.2q.tar.gz.sha512 new file mode 100644 index 0000000000..51ecda40bd --- /dev/null +++ b/pkg/osx/shasums/openssl-1.0.2q.tar.gz.sha512 @@ -0,0 +1 @@ +403e6cad42db3ba860c3fa4fa81c1b7b02f0b873259e5c19a7fc8e42de0854602555f1b1ca74f4e3a7737a4cbd3aac063061e628ec86534586500819fae7fec0 ./openssl-1.0.2q.tar.gz diff --git a/pkg/osx/shasums/zeromq-4.1.4.tar.gz.sha512 b/pkg/osx/shasums/zeromq-4.1.4.tar.gz.sha512 deleted file mode 100644 index 4f8932f829..0000000000 --- a/pkg/osx/shasums/zeromq-4.1.4.tar.gz.sha512 +++ /dev/null @@ -1 +0,0 @@ -8a8cf4f52ad78dddfff104bfba0f80bbc12566920906a0fafb9fc340aa92f5577c2923cb2e5346c69835cd2ea1609647a8893c2883cd22c1f0340a720511460c ./zeromq-4.1.4.tar.gz diff --git a/pkg/osx/shasums/zeromq-4.1.6.tar.gz.sha512 b/pkg/osx/shasums/zeromq-4.1.6.tar.gz.sha512 new file mode 100644 index 0000000000..1d0c448918 --- /dev/null +++ b/pkg/osx/shasums/zeromq-4.1.6.tar.gz.sha512 @@ -0,0 +1 @@ +c04a6bb7a719687d8e8e5e8a103f93ab75ead3fcd3516e6089959e4f02cff7c18e9d7a8696af4245d434b45e6aa6e2ca8f73d98db058df621bca3def97bf7af1 ./zeromq-4.1.6.tar.gz diff --git a/pkg/windows/req.txt b/pkg/windows/req.txt index 998164da01..b9c3488ce8 100644 --- a/pkg/windows/req.txt +++ b/pkg/windows/req.txt @@ -1,40 +1,40 @@ backports-abc==0.5 -backports.ssl-match-hostname==3.5.0.1 +backports.ssl-match-hostname==3.7.0.1 certifi -cffi==1.10.0 -CherryPy==10.2.1 -cryptography==2.1.4 +cffi==1.11.5 +CherryPy==17.4.1 +cryptography==2.4.2 enum34==1.1.6 -futures==3.1.1 +futures==3.2.0; python_version == '2.7' gitdb==0.6.4 -GitPython==2.1.3 -idna==2.5 +GitPython==2.1.10 +idna==2.8 ioloop==0.1a0 -ipaddress==1.0.18 -Jinja2==2.9.6 +ipaddress==1.0.22 +Jinja2==2.10 libnacl==1.6.1 # required by the nacl module -lxml==3.7.3 -Mako==1.0.6 -MarkupSafe==1.0 -msgpack-python==0.4.8 -psutil==5.2.2 -pyasn1==0.2.3 -pycparser==2.17 +lxml==4.3.0 +Mako==1.0.7 +MarkupSafe==1.1.0 +msgpack-python==0.5.6 +psutil==5.4.8 +pyasn1==0.4.5 +pycparser==2.19 pycrypto==2.6.1 -pycurl==7.43.0 -PyMySQL==0.7.11 -pyOpenSSL==17.5.0 +pycurl==7.43.0.2 +PyMySQL==0.9.3 +pyOpenSSL==18.0.0 #python-certifi-win32==1.2 -python-dateutil==2.6.1 -python-gnupg==0.4.1 +python-dateutil==2.7.5 +python-gnupg==0.4.3 pythonnet==2.3.0 -pywin32==223 -PyYAML==3.12 -pyzmq==16.0.3 +pywin32==224 +PyYAML==3.13 +pyzmq==17.1.2 requests==2.21.0 singledispatch==3.4.0.3 smmap==0.9.0 timelib==0.2.4 -tornado==4.5.1 -wheel==0.30.0a0 +tornado==4.5.3 +wheel==0.32.3 WMI==1.4.9 diff --git a/salt/_compat.py b/salt/_compat.py index 8d38f38230..3d208bae0b 100644 --- a/salt/_compat.py +++ b/salt/_compat.py @@ -144,13 +144,6 @@ class IPv6AddressScoped(ipaddress.IPv6Address): :param address: ''' - # pylint: disable-all - if not hasattr(self, '_is_packed_binary'): - # This method (below) won't be around for some Python 3 versions - # and we need check this differently anyway - self._is_packed_binary = lambda p: isinstance(p, bytes) - # pylint: enable-all - if isinstance(address, string_types) and '%' in address: buff = address.split('%') if len(buff) != 2: @@ -189,7 +182,7 @@ class IPv6AddressScoped(ipaddress.IPv6Address): :return: ''' packed = False - if len(data) == 16 and ':' not in data: + if isinstance(data, bytes) and len(data) == 16 and b':' not in data: try: packed = bool(int(str(bytearray(data)).encode('hex'), 16)) except ValueError: diff --git a/salt/auth/__init__.py b/salt/auth/__init__.py index ca7168d00e..f7a0102a5a 100644 --- a/salt/auth/__init__.py +++ b/salt/auth/__init__.py @@ -93,9 +93,14 @@ class LoadAuth(object): fstr = '{0}.auth'.format(load['eauth']) if fstr not in self.auth: return False + # When making auth calls, only username, password, auth, and token + # are valid, so we strip anything else out. + _valid = ['username', 'password', 'eauth', 'token'] + _load = {key: value for (key, value) in load.items() if key in _valid} + fcall = salt.utils.args.format_call( self.auth[fstr], - load, + _load, expected_extra_kws=AUTH_INTERNAL_KEYWORDS) try: if 'kwargs' in fcall: diff --git a/salt/cli/caller.py b/salt/cli/caller.py index 03ca515e18..bcdc306ef2 100644 --- a/salt/cli/caller.py +++ b/salt/cli/caller.py @@ -220,7 +220,13 @@ class BaseCaller(object): } data.update(kwargs) executors = getattr(self.minion, 'module_executors', []) or \ - self.opts.get('module_executors', ['direct_call']) + salt.utils.args.yamlify_arg( + self.opts.get('module_executors', '[direct_call]') + ) + if self.opts.get('executor_opts', None): + data['executor_opts'] = salt.utils.args.yamlify_arg( + self.opts['executor_opts'] + ) if isinstance(executors, six.string_types): executors = [executors] try: diff --git a/tests/integration/modules/test_cp.py b/tests/integration/modules/test_cp.py index 02ef39beb9..2d8d03b6de 100644 --- a/tests/integration/modules/test_cp.py +++ b/tests/integration/modules/test_cp.py @@ -22,6 +22,9 @@ from tests.support.helpers import ( from tests.support.unit import skipIf import tests.support.paths as paths +# Import 3rd party libs +import salt.ext.six as six + # Import salt libs import salt.utils.files import salt.utils.path @@ -78,6 +81,7 @@ class CPModuleTest(ModuleCase): self.assertNotIn('bacon', data) @with_tempfile() + @skipIf(salt.utils.platform.is_windows() and six.PY3, 'This test hangs on Windows on Py3') def test_get_file_templated_paths(self, tgt): ''' cp.get_file diff --git a/tests/integration/netapi/rest_cherrypy/test_app.py b/tests/integration/netapi/rest_cherrypy/test_app.py index 06f232ce07..c54cc84e2b 100644 --- a/tests/integration/netapi/rest_cherrypy/test_app.py +++ b/tests/integration/netapi/rest_cherrypy/test_app.py @@ -191,6 +191,20 @@ class TestRun(cptc.BaseRestCherryPyTest): }) assert response.status == '401 Unauthorized' + def test_run_extra_parameters(self): + ''' + Test the run URL with good auth credentials + ''' + cmd = dict(self.low, **dict(self.auth_creds)) + cmd['id_'] = 'someminionname' + body = urlencode(cmd) + + request, response = self.request('/run', method='POST', body=body, + headers={ + 'content-type': 'application/x-www-form-urlencoded' + }) + self.assertEqual(response.status, '200 OK') + class TestWebhookDisableAuth(cptc.BaseRestCherryPyTest): diff --git a/tests/unit/utils/test_network.py b/tests/unit/utils/test_network.py index 12a9075697..3d20c880bd 100644 --- a/tests/unit/utils/test_network.py +++ b/tests/unit/utils/test_network.py @@ -185,11 +185,17 @@ class NetworkTestCase(TestCase): def test_is_ip(self): self.assertTrue(network.is_ip('10.10.0.3')) self.assertFalse(network.is_ip('0.9.800.1000')) + # Check 16-char-long unicode string + # https://github.com/saltstack/salt/issues/51258 + self.assertFalse(network.is_ipv6('sixteen-char-str')) def test_is_ipv4(self): self.assertTrue(network.is_ipv4('10.10.0.3')) self.assertFalse(network.is_ipv4('10.100.1')) self.assertFalse(network.is_ipv4('2001:db8:0:1:1:1:1:1')) + # Check 16-char-long unicode string + # https://github.com/saltstack/salt/issues/51258 + self.assertFalse(network.is_ipv4('sixteen-char-str')) def test_is_ipv6(self): self.assertTrue(network.is_ipv6('2001:db8:0:1:1:1:1:1')) @@ -202,6 +208,9 @@ class NetworkTestCase(TestCase): self.assertFalse(network.is_ipv6('2001:0db8:::0370:7334')) self.assertFalse(network.is_ipv6('10.0.1.2')) self.assertFalse(network.is_ipv6('2001.0db8.85a3.0000.0000.8a2e.0370.7334')) + # Check 16-char-long unicode string + # https://github.com/saltstack/salt/issues/51258 + self.assertFalse(network.is_ipv6('sixteen-char-str')) def test_parse_host_port(self): _ip = ipaddress.ip_address