Commit Graph

26 Commits

Author SHA1 Message Date
Dominik Csapak
e3b29cc9da do not send websocket status code to port
this is not data, but the status code,
so print it in debug mode instead

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-11-24 09:19:21 +01:00
Dietmar Maurer
80d61dd6bb add content type application/x-compressed-tar 2017-11-09 07:17:49 +01:00
Dietmar Maurer
20a61215ce allow API calls to download file contents.
We use this to download backup files with pmg.
2017-11-08 09:23:30 +01:00
Dietmar Maurer
66a7a3a38d pass $format to rest_handler()
Used by PMG::HTTPServer.
2017-08-10 08:47:32 +02:00
Dominik Csapak
3d12de14cc add json/mp3/oga/svg filetypes
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>
2017-05-24 13:10:39 +02:00
Thomas Lamprecht
967dcb7682 increase max POST data limit to 64 KB
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>
2017-05-24 11:28:22 +02:00
Dietmar Maurer
256da58194 assume all parameters are utf8 encoded
Previously, we called decode_utf8_parameters(), which only encoded
some parameters. This was just an optimization, and it turend out to
be error prone (for example passwords also contain utf8 parameters).
2017-05-02 11:54:29 +02:00
Dietmar Maurer
2fd728c93b avoid locale specific time stamps 2017-04-24 07:39:27 +02:00
Fabian Grünbichler
10f9a4b775 fix #1332: allow ECDHE with all supported curves
with openssl 1.0.1, we had to limit ourself to one curve to
allow ECDHE at all.

with openssl 1.1.x, the same limit actually means only
allowing ECDSA certificates using that curve, even for
non-ephemeral ECDH handshakes, effectively only allowing
prime256 EC certificates.

since openssl 1.1.x supports auto-negotiation of the curve
used for ECDHE, simply use that for now.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2017-04-03 15:05:40 +02:00
Dietmar Maurer
666d3ae1d1 cleanup error message for non-existent files 2017-03-03 06:32:25 +01:00
Dietmar Maurer
8d88baec13 call Net::SSLeay::ERR_clear_error after all handlers
just to be sure.
2017-01-21 11:55:18 +01:00
Dietmar Maurer
6389088689 call Net::SSLeay::ERR_clear_error() after auth_handler
Some auth_handlers use Crypt::OpenSSL::RSA, which seems to set the openssl error
variable. We need to clear that here, else AnyEvent::TLS aborts the connection.
2017-01-20 18:17:13 +01:00
Dietmar Maurer
133e058609 avoid warnings when clients disconnects early 2017-01-20 11:22:40 +01:00
Dietmar Maurer
555a5ab311 improve error message 2017-01-16 11:45:36 +01:00
Dietmar Maurer
ca304f91ce pass basic server configuration to formatter functions 2017-01-15 11:55:52 +01:00
Dietmar Maurer
c5f0a96ffd add some inline docs 2017-01-15 10:54:26 +01:00
Dietmar Maurer
af76fd782d remove base_handler_class from required arguments 2017-01-15 09:25:24 +01:00
Dietmar Maurer
58ddb769fb remove all references to rpcenv (we can do this in the subclass). 2017-01-15 08:34:46 +01:00
Dietmar Maurer
fc87cd5ec3 pass $title to formatter functions 2017-01-14 16:39:25 +01:00
Dietmar Maurer
6edb39f69b include bootstrap-3.3.7-dist.zip files 2017-01-14 15:36:15 +01:00
Dietmar Maurer
911ede9b12 new helper add_dirs (copied from pveproxy.pm) 2017-01-14 14:26:33 +01:00
Dietmar Maurer
5f14e56e33 white space cleanups 2017-01-14 13:18:27 +01:00
Dietmar Maurer
a3bb607024 add new hook function to generate CSRF token
This avoid the reference to PVE::AccessControl.
2017-01-14 13:16:59 +01:00
Dietmar Maurer
c715437597 rework formatter registration
Do the whole thing inside PVE/APIServer/Formatter.pm
2017-01-14 10:42:33 +01:00
Dietmar Maurer
63307bebd9 add generic formatter framework 2017-01-14 09:53:44 +01:00
Dietmar Maurer
d08808bc8a rename class to PVE::APIServer::AnyEvent
So that we can move all api server related code into PVE::APIServer::*.
2017-01-13 18:18:13 +01:00