No timeout on any requests.get() call — application hangs indefinitely on slow/unresponsive server #5
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Every
requests.get()call in the codebase omits atimeoutparameter. The Pythonrequestslibrary defaults to waiting forever when no timeout is specified.Location
4lbion.py, lines 233, 252, 279, 314, 668, 695, 734 — allrequests.get(...)callsRisk
If any upstream server (status endpoint, assets CDN, manifest server, or file download server) is slow or stops responding mid-transfer, the updater thread blocks indefinitely. Because the update thread holds the
server_menuandplay_buttonin a disabled state, the launcher becomes permanently frozen with no way for the user to recover short of killing the process. The 1.8 GB game file download at line 734 is especially vulnerable to this.Suggested fix direction
Add a
timeout=(connect_timeout, read_timeout)tuple to everyrequests.get()call. For the large file download a streaming approach (stream=True) with a per-chunk read timeout is preferable so that a stalled connection is detected during transfer, not only at connect time.Severity
moderate
Found by
Automated audit by Claude Code