ensure new version link has proper url (#1503)

This commit is contained in:
Alex Xu authored and GitHub committed 2026-11-06 14:18:50 -08:00
1 parent ed38402e34
commit c13a837193
1 file changed
+3
+3
View File
@@ -183,6 +183,9 @@ class VersionThread(QThread):
json_parser = requests.get("https://api.github.com/repos/ciromattia/kcc/releases/latest").json() json_parser = requests.get("https://api.github.com/repos/ciromattia/kcc/releases/latest").json()
html_url = json_parser["html_url"] html_url = json_parser["html_url"]
if not html_url.startswith('https://github.com/ciromattia/kcc/releases/tag/'):
print('Somehow you got MITM')
raise Exception('Somehow you got MITM')
latest_version = json_parser["tag_name"] latest_version = json_parser["tag_name"]
latest_version = re.sub(r'^v', "", latest_version) latest_version = re.sub(r'^v', "", latest_version)