This fixes the simple-demo, which was regressed with commit
8782148642 were we falsely assumed that
we always have an rpcenv instance here, but actually that's just
optional as it comes from our child class instance
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
avoid removing and unzipping the bootstrap source archive as many
times as ${BTDATA} has file entries, add an intermediate target for
the directory, which is the producer for all those BTDATA files, and
that directory then depends on the zip archive.
I mean, it would be even better to just use the libjs-bootstrap
package (and jQuery for that matter) but that a little bigger change
for now
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Effective the same approach used in libanyevent-perl 7.140-3[0]
Stretch is also compatible with this, and we can remove it for
buster/PVE 6 once the libanyevent-perl package transitioned to
from unstable to buster, until then do it ourself to have a
functioning api/proxy...
[0]: 7f3d5721bb
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
move the read_proxy_conf method into a new perl module
'PVE::APIServer::Utils'.
It now takes the proxy_name (e.g. pveproxy, pmgproxy) as variable to be used
for the configfile location (/etc/default/$proxy_name)
This serves as preparation to make pmgproxy configurable in the same way as
pveproxy.
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
compression is set to true by default, and we only want to be able to
switch it off, not force it on.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
By making compression configurable the $nocomp flag in response got set to
the configured (or default) setting, irrespective of the explicitly passed
value to response.
This broke (e.g.) noVNC connections
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
Rationale for disabling compression is the potential for being affected by
the BREACH (CVE-2013-3587) attack and it's considered good practice for https
configuration (see e.g. [0]).
The default remains: to have compression enabled for compressible file-types.
[0] https://cipherli.st/
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
Needed to fix#2069.
Prefering the ciphers set in the server, instead of relying on the offer of the
client is considered good practice in TLS1.[012] (see e.g. [0]).
[0] https://cipherli.st/
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
commit a4d8bbafbe
introduced an additional empty line after '200 OK'
for remote-viewer 7 to work, but we also have to read this line
in our own proxy reader else the connection to a remote node does
not work
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
the glib implementation of the http proxy correctly checks the
http response (response code, followed by an empty line)
so we need to answer with the correct status
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
AnyEvent checks rbuf_max after calling the callback (too late), so
we can receive larger data, because AnyEvent uses MAX_READ_SIZE=131072
to fill the buffer.
So a more elegant solution is to set $max_payload_size=128*1024. At least
I am not able to receive rbuf larger than 128*1024 now. But I keep the
protection from the previous patch - just to be sure.
The given patch fixes incoming WebSocket traffic behind buffered Proxies
like NGINX.
NGINX buffers multiple requests from the Browser into one frame and sends that to pveproxy,
before this patch we then processed the first message of the frame and cleared the buffer which
may contained more messages.
With this patch we process each message and clear the buffer right.
This fixes the "NoVNC blank screen" problem users reported on the forums.
Allows to fix a problem where a logged in connected client was logged
out because we could not verify him for this call as the cluster
filesystem was unavailable.
If we get such a exception then use it for responding.
THis is save as no logged out client can get ever do anything where
login privileges are required and a logged in client cannot to
anything during the problematic period, but does not gets logged out.
Partail fix for #1589
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
those are needed for the noVNC upgrade
svg: button images
mp3/oga: bell sound of terminal
json: language files
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
this matches also our wbuf_max settings of our AnyEvent handle
Tested with 1000 parallel started dummy POST request with 64KB
payload, wh
It should not be too problematic to increase the limit
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>