mirror of
https://github.com/cockpit-project/cockpit.git
synced 2026-11-03 21:49:50 -09:00
The shell currently accidentally forwards the "init" message from each
iframe to the shell, meaning an extra init message gets sent for every
page.
Based on the comments in this function about "Only control messages with
a channel are forwardable" and "Everything else gets forwarded", it
seems unintentional that init messages (which are explicitly handled and
don't have a channel) were ever intended to be forwarded.
Unfortunately, the "does it have a channel?" check is an "else if" in
the same chain of conditions as the check for `command == "init"` and
(unlike all of the other commands that are checked for) the `"init"`
case doesn't have a `return;` statement at the bottom.
As a result, we accidentally fall through to the "Everything else gets
forwarded" case and send the init message from the iframe along to the
ws.
This bug dates all the way back to the original version of the shell
added in
|
||
|---|---|---|
| .. | ||
| apps | ||
| base1 | ||
| kdump | ||
| lib | ||
| metrics | ||
| networkmanager | ||
| packagekit | ||
| playground | ||
| selinux | ||
| shell | ||
| sosreport | ||
| static | ||
| storaged | ||
| systemd | ||
| users | ||
| Makefile.am | ||
| ruff.toml | ||