Compare commits

..

2 Commits

Author SHA1 Message Date
bashonly
520545b6de
[build] Improve requirements.txt 2023-11-11 21:15:25 +00:00
bashonly
6ea57a34ba
[update] Fix checksum logic 2023-11-11 21:15:07 +00:00
2 changed files with 4 additions and 2 deletions

View File

@ -6,4 +6,4 @@ brotlicffi; implementation_name!='cpython'
certifi
requests>=2.31.0,<3
urllib3>=1.26.17,<3
secretstorage; sys_platform=='linux' and (implementation_name!='pypy' or python_version>='3.10')
secretstorage; sys_platform=='linux' and (implementation_name!='pypy' or implementation_version>='7.3.10')

View File

@ -475,7 +475,9 @@ class Updater:
f'The requested tag {self.requested_repo}@{update_info.tag} does not exist', True)
return self._report_network_error(f'fetch updates: {e}', tag=update_info.tag)
if hashlib.sha256(newcontent).hexdigest() != update_info.checksum:
if not update_info.checksum:
self._block_restart('Automatically restarting into unverified builds is disabled for security reasons')
elif hashlib.sha256(newcontent).hexdigest() != update_info.checksum:
return self._report_network_error('verify the new executable', tag=update_info.tag)
try: