From: Dominik Csapak <d.csapak@proxmox.com>
To: "Fabian Grünbichler" <f.gruenbichler@proxmox.com>,
pve-devel@lists.proxmox.com
Subject: Re: [PATCH http-server 1/2] fix #8021: websocket: check length of close payload
Date: Wed, 9 Sep 2026 14:34:57 +0200 [thread overview]
Message-ID: <670c7deb-45b4-4ff6-bc74-ba13c9c41bbe@proxmox.com> (raw)
In-Reply-To: <20260909120309.432116-1-f.gruenbichler@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
On 9/9/26 2:03 PM, Fabian Grünbichler wrote:
> before unpacking the contained status code, otherwise the debug log might print
> a warning.
>
> Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
> ---
> src/PVE/APIServer/AnyEvent.pm | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/src/PVE/APIServer/AnyEvent.pm b/src/PVE/APIServer/AnyEvent.pm
> index 915d678..12701aa 100644
> --- a/src/PVE/APIServer/AnyEvent.pm
> +++ b/src/PVE/APIServer/AnyEvent.pm
> @@ -674,8 +674,12 @@ sub websocket_proxy {
> if ($opcode == 1 || $opcode == 2) {
> $reqstate->{proxyhdl}->push_write($payload) if $reqstate->{proxyhdl};
> } elsif ($opcode == 8) {
> - my $statuscode = unpack("n", $payload);
> - $self->dprint("websocket received close. status code: '$statuscode'");
> + if ($payload_len < 2) {
> + $self->dprint("websocket received close with too short payload: $payload_len");
> + } else {
> + my $statuscode = unpack("n", $payload);
> + $self->dprint("websocket received close. status code: '$statuscode'");
> + }
> if (my $proxyhdl = $reqstate->{proxyhdl}) {
> $proxyhdl->{block_disconnect} = 1 if length $proxyhdl->{wbuf};
>
prev parent reply other threads:[~2026-09-09 12:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-09 12:03 [PATCH http-server 1/2] fix #8021: websocket: check length of close payload Fabian Grünbichler
2026-09-09 12:03 ` [PATCH http-server 2/2] websocket: include close reason in debug log Fabian Grünbichler
2026-09-09 12:36 ` Dominik Csapak
2026-09-09 12:34 ` Dominik Csapak [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=670c7deb-45b4-4ff6-bc74-ba13c9c41bbe@proxmox.com \
--to=d.csapak@proxmox.com \
--cc=f.gruenbichler@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox