Skip to content

Commit d26a129

Browse files
committed
Release v1.6.17
1 parent 89a1c4b commit d26a129

12 files changed

Lines changed: 65 additions & 23 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ See the [upgrade guide](https://gist.github.com/chrismccord/2ab350f154235ad4a4d0
44

55
Phoenix v1.6 requires Elixir v1.9+.
66

7+
## 1.6.17 (2026-07-07)
8+
9+
### Security fixes
10+
- [CVE-2026-56811](https://github.com/phoenixframework/phoenix/security/advisories/GHSA-6983-jfq8-485w): Add a `max_channels_per_transport` option (defaulting to 100) to prevent a single client from spawning an unbounded number of channels (processes), eventually exhausting the server's memory or process limit.
11+
- [CVE-2026-56812](https://github.com/phoenixframework/phoenix/security/advisories/GHSA-63mc-hw7g-86rr): Prevent presence keys from colliding with `Object.prototype` properties members, crashing the JS Presence client
12+
713
## 1.6.16 (2023-02-17)
814

915
### Bug Fixes

assets/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.

assets/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.6.16",
3+
"version": "1.6.17",
44
"description": "The official JavaScript client for the Phoenix web framework.",
55
"license": "MIT",
66
"main": "./assets/js/phoenix/index.js",

installer/mix.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ end
66
defmodule Phx.New.MixProject do
77
use Mix.Project
88

9-
@version "1.6.16"
9+
@version "1.6.17"
1010
@scm_url "https://github.com/phoenixframework/phoenix"
1111

1212
# If the elixir requirement is updated, we need to update:

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.6.16"
11+
@version "1.6.17"
1212
@scm_url "https://github.com/phoenixframework/phoenix"
1313

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

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.6.16",
3+
"version": "1.6.17",
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: 16 additions & 4 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: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,7 @@ var Phoenix = (() => {
556556
var Presence = class {
557557
constructor(channel, opts = {}) {
558558
let events = opts.events || { state: "presence_state", diff: "presence_diff" };
559-
this.state = {};
559+
this.state = /* @__PURE__ */ Object.create(null);
560560
this.pendingDiffs = [];
561561
this.channel = channel;
562562
this.joinRef = null;
@@ -604,9 +604,10 @@ var Phoenix = (() => {
604604
return !this.joinRef || this.joinRef !== this.channel.joinRef();
605605
}
606606
static syncState(currentState, newState, onJoin, onLeave) {
607-
let state = this.clone(currentState);
608-
let joins = {};
609-
let leaves = {};
607+
let state = this.toNullProtoObj(this.clone(currentState));
608+
newState = this.toNullProtoObj(newState);
609+
let joins = /* @__PURE__ */ Object.create(null);
610+
let leaves = /* @__PURE__ */ Object.create(null);
610611
this.map(state, (key, presence) => {
611612
if (!newState[key]) {
612613
leaves[key] = presence;
@@ -634,6 +635,7 @@ var Phoenix = (() => {
634635
return this.syncDiff(state, { joins, leaves }, onJoin, onLeave);
635636
}
636637
static syncDiff(state, diff, onJoin, onLeave) {
638+
state = this.toNullProtoObj(state);
637639
let { joins, leaves } = this.clone(diff);
638640
if (!onJoin) {
639641
onJoin = function() {
@@ -682,6 +684,16 @@ var Phoenix = (() => {
682684
static map(obj, func) {
683685
return Object.getOwnPropertyNames(obj).map((key) => func(key, obj[key]));
684686
}
687+
static toNullProtoObj(obj) {
688+
if (Object.getPrototypeOf(obj) === null) {
689+
return obj;
690+
}
691+
let cleaned = /* @__PURE__ */ Object.create(null);
692+
Object.getOwnPropertyNames(obj).forEach((key) => {
693+
cleaned[key] = obj[key];
694+
});
695+
return cleaned;
696+
}
685697
static clone(obj) {
686698
return JSON.parse(JSON.stringify(obj));
687699
}

priv/static/phoenix.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)