Skip to content

Commit ddcdadb

Browse files
committed
Release v1.8.6
1 parent 1a67c61 commit ddcdadb

10 files changed

Lines changed: 46 additions & 19 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ This release introduces deprecation warnings for several features that have been
2929

3030
* The `config` variable is no longer available in `Phoenix.Endpoint`. In the past, it was possible to read your endpoint configuration at compile-time via an injected variable named `config`, which is no longer supported. Use `Application.compile_env/3` instead, which is tracked by the Elixir compiler and lead to a better developer experience. This may also lead to errors on application boot if you were previously incorrectly setting compile time config at runtime.
3131

32+
## 1.8.6 (2026-05-05)
33+
34+
### Security fixes
35+
36+
* [CVE-2026-32689](https://github.com/phoenixframework/phoenix/security/advisories/GHSA-628h-q48j-jr6q): Fix Phoenix.Socket Longpoll transport memory exhaustion in nd-JSON body splitting
37+
3238
## 1.8.5 (2026-03-05)
3339

3440
### JavaScript Client Bug Fixes

mix.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ defmodule Phoenix.MixProject do
88
end
99
end
1010

11-
@version "1.8.5"
11+
@version "1.8.6"
1212
@scm_url "https://github.com/phoenixframework/phoenix"
1313

1414
# If the elixir requirement is updated, we need to make the installer

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "phoenix",
3-
"version": "1.8.5",
3+
"version": "1.8.6",
44
"description": "The official JavaScript client for the Phoenix web framework.",
55
"license": "MIT",
66
"module": "./priv/static/phoenix.mjs",

priv/static/phoenix.cjs.js

Lines changed: 10 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

priv/static/phoenix.cjs.js.map

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

priv/static/phoenix.js

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ var Phoenix = (() => {
4545
var global = globalSelf || phxWindow || globalThis;
4646
var DEFAULT_VSN = "2.0.0";
4747
var SOCKET_STATES = { connecting: 0, open: 1, closing: 2, closed: 3 };
48+
var MAX_LONGPOLL_BATCH_SIZE = 100;
4849
var DEFAULT_TIMEOUT = 1e4;
4950
var WS_CLOSE_NORMAL = 1e3;
5051
var CHANNEL_STATES = {
@@ -746,16 +747,22 @@ var Phoenix = (() => {
746747
}, 0);
747748
}
748749
}
749-
batchSend(messages) {
750+
batchSend(messages, offset = 0) {
750751
this.awaitingBatchAck = true;
751-
this.ajax("POST", { "Content-Type": "application/x-ndjson" }, messages.join("\n"), () => this.onerror("timeout"), (resp) => {
752-
this.awaitingBatchAck = false;
752+
const next = offset + MAX_LONGPOLL_BATCH_SIZE;
753+
const batch = messages.slice(offset, next);
754+
this.ajax("POST", { "Content-Type": "application/x-ndjson" }, batch.join("\n"), () => this.onerror("timeout"), (resp) => {
753755
if (!resp || resp.status !== 200) {
756+
this.awaitingBatchAck = false;
754757
this.onerror(resp && resp.status);
755758
this.closeAndRetry(1011, "internal server error", false);
759+
} else if (next < messages.length) {
760+
this.batchSend(messages, next);
756761
} else if (this.batchBuffer.length > 0) {
757762
this.batchSend(this.batchBuffer);
758763
this.batchBuffer = [];
764+
} else {
765+
this.awaitingBatchAck = false;
759766
}
760767
});
761768
}

priv/static/phoenix.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

priv/static/phoenix.mjs

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ var phxWindow = typeof window !== "undefined" ? window : null;
1616
var global = globalSelf || phxWindow || globalThis;
1717
var DEFAULT_VSN = "2.0.0";
1818
var SOCKET_STATES = { connecting: 0, open: 1, closing: 2, closed: 3 };
19+
var MAX_LONGPOLL_BATCH_SIZE = 100;
1920
var DEFAULT_TIMEOUT = 1e4;
2021
var WS_CLOSE_NORMAL = 1e3;
2122
var CHANNEL_STATES = {
@@ -717,16 +718,22 @@ var LongPoll = class {
717718
}, 0);
718719
}
719720
}
720-
batchSend(messages) {
721+
batchSend(messages, offset = 0) {
721722
this.awaitingBatchAck = true;
722-
this.ajax("POST", { "Content-Type": "application/x-ndjson" }, messages.join("\n"), () => this.onerror("timeout"), (resp) => {
723-
this.awaitingBatchAck = false;
723+
const next = offset + MAX_LONGPOLL_BATCH_SIZE;
724+
const batch = messages.slice(offset, next);
725+
this.ajax("POST", { "Content-Type": "application/x-ndjson" }, batch.join("\n"), () => this.onerror("timeout"), (resp) => {
724726
if (!resp || resp.status !== 200) {
727+
this.awaitingBatchAck = false;
725728
this.onerror(resp && resp.status);
726729
this.closeAndRetry(1011, "internal server error", false);
730+
} else if (next < messages.length) {
731+
this.batchSend(messages, next);
727732
} else if (this.batchBuffer.length > 0) {
728733
this.batchSend(this.batchBuffer);
729734
this.batchBuffer = [];
735+
} else {
736+
this.awaitingBatchAck = false;
730737
}
731738
});
732739
}

priv/static/phoenix.mjs.map

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)