Commit ab83cedc authored by Thomas Gambier's avatar Thomas Gambier

Update Release Candidate

parents f998d5bd c2bfe70f
...@@ -75,7 +75,6 @@ scikit-learn = 0.18.1 ...@@ -75,7 +75,6 @@ scikit-learn = 0.18.1
statsmodels = 0.8.0 statsmodels = 0.8.0
terminado = 0.6 terminado = 0.6
tornado = 4.4.2 tornado = 4.4.2
traitlets = 4.3.3
# nbconvert 4.2.0 depends on entrypoints egg that is not available as tar/zip source. # nbconvert 4.2.0 depends on entrypoints egg that is not available as tar/zip source.
nbconvert = 4.1.0 nbconvert = 4.1.0
......
...@@ -145,7 +145,7 @@ ...@@ -145,7 +145,7 @@
"type": "object" "type": "object"
}, },
"hosts-dict": { "hosts-dict": {
"description": "Host entries to be used in addition to and/or overriding auto-generated ones (erp5-catalog-0, erp5-cloudooo, erp5-memcached-persistent, erp5-memcached-volatile and erp5-smtp)", "description": "Host entries to be used in addition to and/or overriding auto-generated ones (erp5-catalog-0, erp5-memcached-persistent, erp5-memcached-volatile and erp5-smtp)",
"patternProperties": { "patternProperties": {
".*": { ".*": {
"description": "An IP or domain name to which current entry will resolve", "description": "An IP or domain name to which current entry will resolve",
...@@ -294,11 +294,14 @@ ...@@ -294,11 +294,14 @@
], ],
"type": "object" "type": "object"
}, },
"cloudooo-url": { "cloudooo-url-list": {
"description": "Format conversion service URL", "description": "Format conversion service URLs",
"type": "array",
"items": {
"pattern": "^https?://", "pattern": "^https?://",
"type": "string", "type": "string",
"format": "uri" "format": "uri"
}
}, },
"cloudooo-retry-count": { "cloudooo-retry-count": {
"description": "Define retry count for cloudooo in network error case in test", "description": "Define retry count for cloudooo in network error case in test",
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
import contextlib import contextlib
import glob import glob
import http.client
import json import json
import os import os
import shutil import shutil
...@@ -450,17 +451,20 @@ class ZopeSkinsMixin: ...@@ -450,17 +451,20 @@ class ZopeSkinsMixin:
def _setUpClass(cls): def _setUpClass(cls):
super()._setUpClass() super()._setUpClass()
param_dict = cls.getRootPartitionConnectionParameterDict() param_dict = cls.getRootPartitionConnectionParameterDict()
with cls.getXMLRPCClient() as erp5_xmlrpc_client: # wait for ERP5 to be ready and have processed all activities
# wait for ERP5 to be ready (TODO: this should probably be a promise) # from initial setup
for _ in range(120): for _ in range(120):
time.sleep(1) with cls.getXMLRPCClient() as erp5_xmlrpc_client:
try: try:
erp5_xmlrpc_client.getTitle() if erp5_xmlrpc_client.portal_activities.countMessage() == 0:
break
except (xmlrpc.client.ProtocolError, except (xmlrpc.client.ProtocolError,
xmlrpc.client.Fault): xmlrpc.client.Fault,
http.client.HTTPException):
pass pass
time.sleep(5)
else: else:
break raise AssertionError("ERP5 is not ready")
@classmethod @classmethod
def _getAuthenticatedZopeUrl(cls, path, family_name='default'): def _getAuthenticatedZopeUrl(cls, path, family_name='default'):
...@@ -924,3 +928,65 @@ class TestZopePublisherTimeout(ZopeSkinsMixin, ERP5InstanceTestCase): ...@@ -924,3 +928,65 @@ class TestZopePublisherTimeout(ZopeSkinsMixin, ERP5InstanceTestCase):
self._getAuthenticatedZopeUrl('ERP5Site_doSlowRequest', family_name='no-timeout'), self._getAuthenticatedZopeUrl('ERP5Site_doSlowRequest', family_name='no-timeout'),
verify=False, verify=False,
timeout=6) timeout=6)
class TestCloudooo(ZopeSkinsMixin, ERP5InstanceTestCase):
"""Test ERP5 can be instantiated with cloudooo parameters
"""
__partition_reference__ = 'c'
@classmethod
def getInstanceParameterDict(cls):
return {
'_':
json.dumps({
'cloudooo-url-list': [
'https://cloudooo1.example.com/',
'https://cloudooo2.example.com/',
],
'cloudooo-retry-count': 123,
})
}
def test_cloudooo_url_list_preference(self):
self.assertEqual(
requests.get(
self._getAuthenticatedZopeUrl(
'portal_preferences/getPreferredDocumentConversionServerUrlList'),
verify=False).text,
"['https://cloudooo1.example.com/', 'https://cloudooo2.example.com/']")
@unittest.expectedFailure # setting "retry" is not implemented
def test_cloudooo_retry_count_preference(self):
self.assertEqual(
requests.get(
self._getAuthenticatedZopeUrl(
'portal_preferences/getPreferredDocumentConversionServerRetry'),
verify=False).text,
"123")
class TestCloudoooDefaultParameter(ZopeSkinsMixin, ERP5InstanceTestCase):
"""Test default ERP5 cloudooo parameters
"""
__partition_reference__ = 'cd'
def test_cloudooo_url_list_preference(self):
self.assertIn(
requests.get(
self._getAuthenticatedZopeUrl(
'portal_preferences/getPreferredDocumentConversionServerUrlList'),
verify=False).text,
[
"['https://cloudooo1.erp5.net/', 'https://cloudooo.erp5.net/']",
"['https://cloudooo.erp5.net/', 'https://cloudooo1.erp5.net/']",
])
@unittest.expectedFailure # default value of "retry" does not match schema
def test_cloudooo_retry_count_preference(self):
self.assertEqual(
requests.get(
self._getAuthenticatedZopeUrl(
'portal_preferences/getPreferredDocumentConversionServerRetry'),
verify=False).text,
"2")
...@@ -62,7 +62,6 @@ scripts = ...@@ -62,7 +62,6 @@ scripts =
surykatka = 0.8.0 surykatka = 0.8.0
# For surykatka 0.7.1 # For surykatka 0.7.1
click = 8.0.1
dnspython = 2.1.0 dnspython = 2.1.0
forcediphttpsadapter = 1.0.1 forcediphttpsadapter = 1.0.1
miniupnpc = 2.0.2 miniupnpc = 2.0.2
......
...@@ -44,12 +44,3 @@ url = ${:_profile_base_location_}/${:_update_hash_filename_} ...@@ -44,12 +44,3 @@ url = ${:_profile_base_location_}/${:_update_hash_filename_}
[template-zones-file] [template-zones-file]
recipe = slapos.recipe.build:download recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/${:_update_hash_filename_} url = ${:_profile_base_location_}/${:_update_hash_filename_}
[versions]
PyRSS2Gen = 1.1
cns.recipe.symlink = 0.2.3
plone.recipe.command = 1.1
passlib = 1.7.1
GitPython = 2.1.11
feedparser = 5.2.1
atomize = 0.2.0
...@@ -220,10 +220,7 @@ validators = 0.12.2 ...@@ -220,10 +220,7 @@ validators = 0.12.2
PyRSS2Gen = 1.1 PyRSS2Gen = 1.1
cns.recipe.symlink = 0.2.3 cns.recipe.symlink = 0.2.3
ecdsa = 0.13 ecdsa = 0.13
gitdb = 0.6.4
plone.recipe.command = 1.1
pycrypto = 2.6.1 pycrypto = 2.6.1
smmap = 0.9.0
furl = 2.1.0 furl = 2.1.0
orderedmultidict = 1.0.1 orderedmultidict = 1.0.1
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
# not need these here). # not need these here).
[template-erp5] [template-erp5]
filename = instance-erp5.cfg.in filename = instance-erp5.cfg.in
md5sum = 6d9b94b50ea46b0b98c9019d74780876 md5sum = 2491969d49f8bf9b172e89b1c0e9d98e
[template-balancer] [template-balancer]
filename = instance-balancer.cfg.in filename = instance-balancer.cfg.in
......
...@@ -21,6 +21,10 @@ ...@@ -21,6 +21,10 @@
{% set test_runner_total_database_count = mariadb_test_database_amount %} {% set test_runner_total_database_count = mariadb_test_database_amount %}
{% set test_runner_enabled = mariadb_test_database_amount > 0 %} {% set test_runner_enabled = mariadb_test_database_amount > 0 %}
{% endif -%} {% endif -%}
{# Backward compatibility for cloudooo-url #}
{% if slapparameter_dict.get('cloudooo-url') -%}
{% do slapparameter_dict.setdefault('cloudooo-url-list', slapparameter_dict['cloudooo-url'].split(',')) %}
{% endif -%}
{% set test_runner_random_activity_priority = slapparameter_dict.get('test-runner', {}).get('random-activity-priority') -%} {% set test_runner_random_activity_priority = slapparameter_dict.get('test-runner', {}).get('random-activity-priority') -%}
{% set monitor_base_url_dict = {} -%} {% set monitor_base_url_dict = {} -%}
{% set monitor_dict = slapparameter_dict.get('monitor', {}) %} {% set monitor_dict = slapparameter_dict.get('monitor', {}) %}
...@@ -231,7 +235,7 @@ return = ...@@ -231,7 +235,7 @@ return =
{% endif -%} {% endif -%}
config-bt5 = {{ dumps(slapparameter_dict.get('bt5', ' '.join(bt5_default_list))) }} config-bt5 = {{ dumps(slapparameter_dict.get('bt5', ' '.join(bt5_default_list))) }}
config-bt5-repository-url = {{ dumps(slapparameter_dict.get('bt5-repository-url', local_bt5_repository)) }} config-bt5-repository-url = {{ dumps(slapparameter_dict.get('bt5-repository-url', local_bt5_repository)) }}
config-cloudooo-url = {{ dumps(slapparameter_dict.get('cloudooo-url', default_cloudooo_url)) }} config-cloudooo-url-list = {{ dumps(slapparameter_dict.get('cloudooo-url-list', default_cloudooo_url_list)) }}
config-caucase-url = {{ dumps(caucase_url) }} config-caucase-url = {{ dumps(caucase_url) }}
config-deadlock-debugger-password = ${publish-early:deadlock-debugger-password} config-deadlock-debugger-password = ${publish-early:deadlock-debugger-password}
config-developer-list = {{ dumps(slapparameter_dict.get('developer-list', [inituser_login])) }} config-developer-list = {{ dumps(slapparameter_dict.get('developer-list', [inituser_login])) }}
......
...@@ -146,8 +146,6 @@ scripts = ...@@ -146,8 +146,6 @@ scripts =
[versions] [versions]
Flask-Auth = 0.85 Flask-Auth = 0.85
futures = 3.0.5 futures = 3.0.5
gitdb = 0.6.4
gunicorn = 19.10.0 gunicorn = 19.10.0
prettytable = 0.7.2 prettytable = 0.7.2
pycurl = 7.43.0 pycurl = 7.43.0
smmap = 0.9.0
...@@ -174,7 +174,7 @@ context = ...@@ -174,7 +174,7 @@ context =
key dash_location dash:location key dash_location dash:location
key bash_location bash:location key bash_location bash:location
key dcron_location dcron:location key dcron_location dcron:location
key default_cloudooo_url erp5-defaults:cloudooo-connection-url key default_cloudooo_url_list erp5-defaults:cloudooo-connection-url-list
key erp5_location erp5:location key erp5_location erp5:location
key findutils_location findutils:location key findutils_location findutils:location
key gzip_location gzip:location key gzip_location gzip:location
...@@ -331,7 +331,11 @@ repository_id_list = erp5 erp5-bin erp5-doc ...@@ -331,7 +331,11 @@ repository_id_list = erp5 erp5-bin erp5-doc
# ERP5 defaults, which can be overridden in inheriting recipes (e.g. wendelin) # ERP5 defaults, which can be overridden in inheriting recipes (e.g. wendelin)
[erp5-defaults] [erp5-defaults]
cloudooo-connection-url = https://cloudooo.erp5.net/ # Default cloudooo is https://cloudooo.erp5.net/ and https://cloudooo1.erp5.net/ in random order.
# The random order is applied in instance profile
cloudooo-connection-url-list =
https://cloudooo.erp5.net/
https://cloudooo1.erp5.net/
# Jupyter is by default disabled in ERP5 # Jupyter is by default disabled in ERP5
jupyter-enable-default = false jupyter-enable-default = false
# WCFS is by default disabled in ERP5 # WCFS is by default disabled in ERP5
......
...@@ -70,11 +70,11 @@ md5sum = b95084ae9eed95a68eada45e28ef0c04 ...@@ -70,11 +70,11 @@ md5sum = b95084ae9eed95a68eada45e28ef0c04
[template] [template]
filename = instance.cfg.in filename = instance.cfg.in
md5sum = 74979d6743cdc7ce3d2f17680115458d md5sum = 3f7b28085ceff321a3cb785db60f7c3e
[template-erp5] [template-erp5]
filename = instance-erp5.cfg.in filename = instance-erp5.cfg.in
md5sum = 52dfc0c9a4547b1e928707ef5caeecdb md5sum = 30a1e738a8211887e75a5e75820e5872
[template-zeo] [template-zeo]
filename = instance-zeo.cfg.in filename = instance-zeo.cfg.in
...@@ -86,7 +86,7 @@ md5sum = 0ac4b74436f554cd677f19275d18d880 ...@@ -86,7 +86,7 @@ md5sum = 0ac4b74436f554cd677f19275d18d880
[template-zope] [template-zope]
filename = instance-zope.cfg.in filename = instance-zope.cfg.in
md5sum = 57a19c90d281b8cbf3e36207db48f0bd md5sum = 7d3b3769b60f0cc2883beeb05cdf82d7
[template-balancer] [template-balancer]
filename = instance-balancer.cfg.in filename = instance-balancer.cfg.in
......
...@@ -21,6 +21,10 @@ ...@@ -21,6 +21,10 @@
{% set test_runner_total_database_count = mariadb_test_database_amount %} {% set test_runner_total_database_count = mariadb_test_database_amount %}
{% set test_runner_enabled = mariadb_test_database_amount > 0 %} {% set test_runner_enabled = mariadb_test_database_amount > 0 %}
{% endif -%} {% endif -%}
{# Backward compatibility for cloudooo-url #}
{% if slapparameter_dict.get('cloudooo-url') -%}
{% do slapparameter_dict.setdefault('cloudooo-url-list', slapparameter_dict['cloudooo-url'].split(',')) %}
{% endif -%}
{% set test_runner_random_activity_priority = slapparameter_dict.get('test-runner', {}).get('random-activity-priority') -%} {% set test_runner_random_activity_priority = slapparameter_dict.get('test-runner', {}).get('random-activity-priority') -%}
{% set monitor_base_url_dict = {} -%} {% set monitor_base_url_dict = {} -%}
{% set monitor_dict = slapparameter_dict.get('monitor', {}) %} {% set monitor_dict = slapparameter_dict.get('monitor', {}) %}
...@@ -234,7 +238,7 @@ return = ...@@ -234,7 +238,7 @@ return =
{% endif -%} {% endif -%}
config-bt5 = {{ dumps(slapparameter_dict.get('bt5', ' '.join(bt5_default_list))) }} config-bt5 = {{ dumps(slapparameter_dict.get('bt5', ' '.join(bt5_default_list))) }}
config-bt5-repository-url = {{ dumps(slapparameter_dict.get('bt5-repository-url', local_bt5_repository)) }} config-bt5-repository-url = {{ dumps(slapparameter_dict.get('bt5-repository-url', local_bt5_repository)) }}
config-cloudooo-url = {{ dumps(slapparameter_dict.get('cloudooo-url', default_cloudooo_url)) }} config-cloudooo-url-list = {{ dumps(slapparameter_dict.get('cloudooo-url-list', default_cloudooo_url_list)) }}
config-caucase-url = {{ dumps(caucase_url) }} config-caucase-url = {{ dumps(caucase_url) }}
config-deadlock-debugger-password = ${publish-early:deadlock-debugger-password} config-deadlock-debugger-password = ${publish-early:deadlock-debugger-password}
config-developer-list = {{ dumps(slapparameter_dict.get('developer-list', [inituser_login])) }} config-developer-list = {{ dumps(slapparameter_dict.get('developer-list', [inituser_login])) }}
......
...@@ -33,7 +33,6 @@ partition. No more (undefined result), no less (IndexError). ...@@ -33,7 +33,6 @@ partition. No more (undefined result), no less (IndexError).
{% for alias, url in ( {% for alias, url in (
('erp5-memcached-volatile', slapparameter_dict['memcached-url']), ('erp5-memcached-volatile', slapparameter_dict['memcached-url']),
('erp5-memcached-persistent', slapparameter_dict['kumofs-url']), ('erp5-memcached-persistent', slapparameter_dict['kumofs-url']),
('erp5-cloudooo', slapparameter_dict['cloudooo-url']),
('erp5-smtp', slapparameter_dict['smtp-url']), ('erp5-smtp', slapparameter_dict['smtp-url']),
) -%} ) -%}
{% set parsed_url = urllib_parse.urlparse(url) -%} {% set parsed_url = urllib_parse.urlparse(url) -%}
...@@ -282,12 +281,7 @@ bt5 = {{ slapparameter_dict['bt5'] }} ...@@ -282,12 +281,7 @@ bt5 = {{ slapparameter_dict['bt5'] }}
bt5-repository-url = {{ slapparameter_dict['bt5-repository-url'] }} bt5-repository-url = {{ slapparameter_dict['bt5-repository-url'] }}
id-store-interval = {{ dumps(slapparameter_dict['id-store-interval']) }} id-store-interval = {{ dumps(slapparameter_dict['id-store-interval']) }}
home = ${buildout:directory} home = ${buildout:directory}
# We only want to change the hostname to 'erp5-cloudooo' if we use the internal cloudooo-url = {{ ",".join(slapparameter_dict['cloudooo-url-list']) }}
# cloudooo. We plan to remove the ability to have an internal one, so this
# heuristic is enough.
{% set cloudooo = urllib_parse.urlsplit(slapparameter_dict['cloudooo-url']) -%}
cloudooo-url = {{ (cloudooo if cloudooo.port == None else
cloudooo._replace(netloc='erp5-cloudooo:%s' % cloudooo.port)).geturl() }}
{% endif -%} {% endif -%}
developer-list = {{ dumps(slapparameter_dict['developer-list']) }} developer-list = {{ dumps(slapparameter_dict['developer-list']) }}
...@@ -506,11 +500,8 @@ wrapper-path = ${directory:bin}/${:command-name}.real ...@@ -506,11 +500,8 @@ wrapper-path = ${directory:bin}/${:command-name}.real
command-line = command-line =
'{{ parameter_dict['bin-directory'] }}/${:command-name}' '{{ parameter_dict['bin-directory'] }}/${:command-name}'
${:command-line-extra} ${:command-line-extra}
--conversion_server_url={{ slapparameter_dict['cloudooo-url'] }} --conversion_server_url={{ ",".join(slapparameter_dict['cloudooo-url-list']) }}
--conversion_server_retry_count={{ slapparameter_dict.get('cloudooo-retry-count', 2) }} --conversion_server_retry_count={{ slapparameter_dict.get('cloudooo-retry-count', 2) }}
{#- BBB: We still have test suites that only accept the following 2 options. #}
--conversion_server_hostname=erp5-cloudooo
--conversion_server_port={{ port_dict['erp5-cloudooo'] }}
--volatile_memcached_server_hostname=erp5-memcached-volatile --volatile_memcached_server_hostname=erp5-memcached-volatile
--volatile_memcached_server_port={{ port_dict['erp5-memcached-volatile'] }} --volatile_memcached_server_port={{ port_dict['erp5-memcached-volatile'] }}
--persistent_memcached_server_hostname=erp5-memcached-persistent --persistent_memcached_server_hostname=erp5-memcached-persistent
......
...@@ -26,8 +26,21 @@ extra-context = ...@@ -26,8 +26,21 @@ extra-context =
section parameter_dict dynamic-template-postfix-parameters section parameter_dict dynamic-template-postfix-parameters
import urllib urllib import urllib urllib
[default-cloudooo-url-list]
recipe = slapos.recipe.build
default-url-list =
{{ default_cloudooo_url_list | indent }}
init =
# Expose the default cloudooo URLs, sorted using a pseudo-random seed,
# so that the same instance keep the same order
import six, random
seed = repr(sorted(six.iteritems(self.buildout['slap-connection'])))
default_cloudooo_url_list = [url.strip() for url in self.options['default-url-list'].splitlines()]
random.Random(seed).shuffle(default_cloudooo_url_list)
self.options['url-list'] = default_cloudooo_url_list
[dynamic-template-erp5-parameters] [dynamic-template-erp5-parameters]
default-cloudooo-url = {{ dumps(default_cloudooo_url) }} default-cloudooo-url-list = ${default-cloudooo-url-list:url-list}
jupyter-enable-default = {{ jupyter_enable_default }} jupyter-enable-default = {{ jupyter_enable_default }}
wcfs-enable-default = {{ wcfs_enable_default }} wcfs-enable-default = {{ wcfs_enable_default }}
local-bt5-repository = {{ ' '.join(local_bt5_repository.split()) }} local-bt5-repository = {{ ' '.join(local_bt5_repository.split()) }}
...@@ -42,7 +55,7 @@ template-zodb-base = {{ template_zodb_base }} ...@@ -42,7 +55,7 @@ template-zodb-base = {{ template_zodb_base }}
url = {{ template_erp5 }} url = {{ template_erp5 }}
filename = instance-erp5.cfg filename = instance-erp5.cfg
extra-context = extra-context =
key default_cloudooo_url dynamic-template-erp5-parameters:default-cloudooo-url key default_cloudooo_url_list dynamic-template-erp5-parameters:default-cloudooo-url-list
key jupyter_enable_default dynamic-template-erp5-parameters:jupyter-enable-default key jupyter_enable_default dynamic-template-erp5-parameters:jupyter-enable-default
key wcfs_enable_default dynamic-template-erp5-parameters:wcfs-enable-default key wcfs_enable_default dynamic-template-erp5-parameters:wcfs-enable-default
key local_bt5_repository dynamic-template-erp5-parameters:local-bt5-repository key local_bt5_repository dynamic-template-erp5-parameters:local-bt5-repository
......
...@@ -18,7 +18,7 @@ md5sum = e24d0567cda7c72e39f6c8fcb0ede7ab ...@@ -18,7 +18,7 @@ md5sum = e24d0567cda7c72e39f6c8fcb0ede7ab
[pbsready-import] [pbsready-import]
filename = pbsready-import.cfg.in filename = pbsready-import.cfg.in
md5sum = 0aa7feb615fc5ac1a132a6d92c80f954 md5sum = da1d3229fe6d3664720d75b2e9d0b8f4
[pbsready-export] [pbsready-export]
filename = pbsready-export.cfg.in filename = pbsready-export.cfg.in
...@@ -46,7 +46,7 @@ md5sum = 2c9828b57a65ee1eda62fcc4e9a92714 ...@@ -46,7 +46,7 @@ md5sum = 2c9828b57a65ee1eda62fcc4e9a92714
[resilient-web-takeover-cgi-script-download] [resilient-web-takeover-cgi-script-download]
filename = resilient-web-takeover-cgi-script.py.in filename = resilient-web-takeover-cgi-script.py.in
md5sum = 4137b7ac6b20a6cd897ad58f51a763b1 md5sum = 8f5c9830f4865265d3477fe51425e71d
[template-wrapper] [template-wrapper]
filename = templates/wrapper.in filename = templates/wrapper.in
......
...@@ -105,7 +105,6 @@ takeover-triggered-file-path = $${resiliency-takeover-script:takeover-triggered- ...@@ -105,7 +105,6 @@ takeover-triggered-file-path = $${resiliency-takeover-script:takeover-triggered-
[resilient-web-takeover-password] [resilient-web-takeover-password]
recipe = slapos.cookbook:generate.password recipe = slapos.cookbook:generate.password
storage-path = $${directory:srv}/passwd storage-path = $${directory:srv}/passwd
bytes = 8
[resilient-web-takeover-cgi-script] [resilient-web-takeover-cgi-script]
recipe = collective.recipe.template recipe = collective.recipe.template
......
...@@ -7,8 +7,8 @@ takeover_script = '${resiliency-takeover-script:wrapper-takeover}' ...@@ -7,8 +7,8 @@ takeover_script = '${resiliency-takeover-script:wrapper-takeover}'
import atexit import atexit
import cgi import cgi
import cgitb
import datetime import datetime
import hmac
try: try:
import dbm.gnu as gdbm import dbm.gnu as gdbm
except ImportError: except ImportError:
...@@ -25,8 +25,6 @@ if os.path.exists('resilient_software_release_information.py'): ...@@ -25,8 +25,6 @@ if os.path.exists('resilient_software_release_information.py'):
else: else:
resilient_main = lambda: {} resilient_main = lambda: {}
cgitb.enable()
def deleteTemporaryDirectory(path): def deleteTemporaryDirectory(path):
if os.path.exists(path): if os.path.exists(path):
shutil.rmtree(path) shutil.rmtree(path)
...@@ -108,7 +106,7 @@ if "password" not in form: ...@@ -108,7 +106,7 @@ if "password" not in form:
</html>""" % (latest_backup_message, isBackupInProgress(), getSoftwareReleaseInformationFormatted())) </html>""" % (latest_backup_message, isBackupInProgress(), getSoftwareReleaseInformationFormatted()))
sys.exit(0) sys.exit(0)
if form['password'].value != '${:password}': if not hmac.compare_digest(form['password'].value.encode(), b'${:password}'):
print("<H1>Error</H1>") print("<H1>Error</H1>")
print("Password is invalid.") print("Password is invalid.")
sys.exit(1) sys.exit(1)
......
...@@ -152,7 +152,7 @@ backports.shutil-get-terminal-size = 1.0.0 ...@@ -152,7 +152,7 @@ backports.shutil-get-terminal-size = 1.0.0
bcrypt = 3.1.4 bcrypt = 3.1.4
bleach = 5.0.1 bleach = 5.0.1
CacheControl = 0.12.6:whl CacheControl = 0.12.6:whl
certifi = 2022.6.15 certifi = 2022.12.7
cffi = 1.15.0 cffi = 1.15.0
chardet = 3.0.4 chardet = 3.0.4
charset-normalizer = 2.1.1 charset-normalizer = 2.1.1
...@@ -184,8 +184,8 @@ funcsigs = 1.0.2 ...@@ -184,8 +184,8 @@ funcsigs = 1.0.2
functools32 = 3.2.3.post2 functools32 = 3.2.3.post2
gevent = 20.9.0 gevent = 20.9.0
geventmp = 0.0.1 geventmp = 0.0.1
gitdb2 = 2.0.5 gitdb = 4.0.10
GitPython = 2.1.11 GitPython = 3.1.30
greenlet = 0.4.17 greenlet = 0.4.17
h5py = 2.7.1 h5py = 2.7.1
h11 = 0.14.0 h11 = 0.14.0
...@@ -294,7 +294,7 @@ slapos.recipe.cmmi = 0.19 ...@@ -294,7 +294,7 @@ slapos.recipe.cmmi = 0.19
slapos.recipe.template = 5.0 slapos.recipe.template = 5.0
slapos.toolbox = 0.128 slapos.toolbox = 0.128
statsmodels = 0.11.1 statsmodels = 0.11.1
smmap2 = 2.0.5 smmap = 5.0.0
sniffio = 1.3.0 sniffio = 1.3.0
sortedcontainers = 2.4.0 sortedcontainers = 2.4.0
stevedore = 1.21.0:whl stevedore = 1.21.0:whl
...@@ -314,7 +314,7 @@ urllib3 = 1.26.12 ...@@ -314,7 +314,7 @@ urllib3 = 1.26.12
wcwidth = 0.2.5 wcwidth = 0.2.5
webencodings = 0.5.1 webencodings = 0.5.1
Werkzeug = 2.0.2 Werkzeug = 2.0.2
wheel = 0.35.1:whl wheel = 0.38.4:whl
widgetsnbextension = 2.0.0 widgetsnbextension = 2.0.0
wsproto = 1.2.0 wsproto = 1.2.0
xml-marshaller = 1.0.2 xml-marshaller = 1.0.2
...@@ -335,10 +335,16 @@ charset-normalizer = 2.0.12 ...@@ -335,10 +335,16 @@ charset-normalizer = 2.0.12
click = 6.7 click = 6.7
distro = 1.6.0 distro = 1.6.0
feedparser = 5.2.1 feedparser = 5.2.1
gitdb2 = 2.0.5
GitPython = 2.1.11
pyparsing = 2.2.0 pyparsing = 2.2.0
pyrsistent = 0.16.1 pyrsistent = 0.16.1
requests = 2.27.1 requests = 2.27.1
smmap = 0.9.0
smmap2 = 2.0.5
traitlets = 4.3.3
Werkzeug = 1.0.1 Werkzeug = 1.0.1
wheel = 0.35.1:whl
[versions:sys.version_info < (3,8)] [versions:sys.version_info < (3,8)]
MarkupSafe = 1.0 MarkupSafe = 1.0
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment