From: Szymon Wilczek <[email protected]>
Date: 17 Sep 2026
Subject: fix: cipher: close embed response before getTimestamp to avoid connection starvation
Pull request: #245
Merged: 17 Sep 2026, by devoxin
signed, reported, fixes
- Author Szymon Wilczek author
- Merged-by devoxin maintainer · merged it
diff
@@ -39,16 +39,21 @@ public interface CipherManager { default CachedPlayerScript getPlayerScript(@NotNull HttpInterface httpInterface) { synchronized (this) {+ String scriptUrl; try (CloseableHttpResponse response = httpInterface.execute(new HttpGet("https://www.youtube.com/embed/"))) { HttpClientTools.assertSuccessWithContent(response, "fetch player script (embed)"); String responseText = EntityUtils.toString(response.getEntity(), StandardCharsets.UTF_8);- String scriptUrl = DataFormatTools.extractBetween(responseText, "\"jsUrl\":\"", "\"");+ scriptUrl = DataFormatTools.extractBetween(responseText, "\"jsUrl\":\"", "\""); if (scriptUrl == null) { throw new ExceptionWithResponseBody("no jsUrl found", responseText); }+ } catch (IOException e) {+ throw ExceptionTools.toRuntimeException(e);+ } + try { return new CachedPlayerScript(scriptUrl, getTimestamp(httpInterface, scriptUrl)); } catch (IOException e) { throw ExceptionTools.toRuntimeException(e); discussion · on the pull request
v1 · 2 messages
szymonwilczek author 17 Sep 2026
fix: cipher: close embed response before getTimestamp to avoid connection starvation
devoxin maintainer 17 Sep 2026
approved