We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d6a4f89 commit 40fa549Copy full SHA for 40fa549
fortls/langserver.py
@@ -1660,7 +1660,9 @@ def _update_version_pypi(self, test: bool = False):
1660
if v.is_prerelease and not test:
1661
return False
1662
try:
1663
- with urllib.request.urlopen("https://pypi.org/pypi/fortls/json") as resp:
+ # For security reasons register as Request before opening
1664
+ request = urllib.request.Request("https://pypi.org/pypi/fortls/json")
1665
+ with urllib.request.urlopen(request) as resp:
1666
info = json.loads(resp.read().decode("utf-8"))
1667
# This is the only reliable way to compare version semantics
1668
if version.parse(info["info"]["version"]) > v or test:
0 commit comments