Commit Graph

86 Commits (75c51c1e93d264915902e1db5beb5750b0f7a9f4)

Author SHA1 Message Date
Pierre Ossman 7f90205cf2 Add stream avail() methods
Makes it more readable to write code that needs to know how much
data/space is available in a stream.
4 years ago
Pierre Ossman c5b7137f2b Flush data on close
There might be some final handshake data that is still stuck in the
buffers, so make a best effort attempt at getting it to the client.
4 years ago
Pierre Ossman a3c0ce55c9 Support calling methods from timers
We can't safely use the normal timers in base classes as we cannot
guarantee that subclasses will call the base class' handleTimeout()
properly if the subclass overrides it.
4 years ago
Lauri Kasanen 1632f4888d Enable basicauth by default, remove the option to supply it on the command line 4 years ago
matt 93d3bf052d Removed old line 4 years ago
matt 7b3f6876b4 Fixed syntax error 4 years ago
matt 46e03289be Manually merged region changes 4 years ago
Lauri Kasanen c3e30dcea1 Add support for DLP_Region 4 years ago
Lauri Kasanen 980eedd33b Add HTTP GET APIs for creating, removing users and giving control 4 years ago
Lauri Kasanen 3f6524ee30 Add support for owner screenshot HTTP GET API 4 years ago
Dmitry Maksyoma 9084409a20 Merge branch 'users' into packages_and_multiuser_passwd 4 years ago
Lauri Kasanen a4e70ff56b Remove less-than-256-colors indexed limit for small rects 4 years ago
Lauri Kasanen 481b063eb7 Fix missing init for DLP timestamps 4 years ago
Lauri Kasanen 531705c05c Remove set-desktop-size perms from read-only clients 5 years ago
Lauri Kasanen 1f69d1584a Prevent read-only clients from changing kasm settings 5 years ago
Lauri Kasanen 36deba3a75 Correct non-basicauth and command-line user:pass being read-only 5 years ago
Lauri Kasanen 0c83a86bc8 Dynamically apply permissions 5 years ago
Lauri Kasanen 263d05a296 Apply read-only perms upon connecting 5 years ago
Lauri Kasanen 80513c8616 Change "recent" to be 10s from 60s, and in its own variable 5 years ago
Lauri Kasanen 279c41fc32 Add option to pass the password in an encrypted file, kasmvncpasswd utility 5 years ago
Lauri Kasanen ae07707e66 Don't log BasicAuth 5 years ago
Lauri Kasanen bb71cd4ec4 Have stats react faster to big cpu lag spikes 5 years ago
Lauri Kasanen 99fe70bbd6 Add a debug-level print on the last ~second's maximum encoding time 5 years ago
Lauri Kasanen b30318a68f Change stats format to JSON array style 5 years ago
Lauri Kasanen d5bdef121a Add support for bottleneck stats 5 years ago
Pierre Ossman 47bba8a1e6 Fix JpegCompressor::overrun() type change
The method it overloads got tweaked some time ago, so we need to make
sure this method follows suit.
5 years ago
Lauri Kasanen 49f9ce8e5b Remove remnants of the old HTTP server 5 years ago
Pierre Ossman 06fd7ac061 Use sys/time.h on Windows as well
Modern MinGW seems to provide this, so simplify things a bit. This also
side steps some of the issue of the windows.h/winsock2.h include
ordering.
5 years ago
Pierre Ossman ed73ac2aa7 Handle pixel formats with odd shift values
Our fast paths assume that each channel fits in to a separate byte.
That means the shift needs to be a multiple of 8. Start actually
checking this so that a client cannot trip us up and possibly cause
incorrect code exection.

Issue found by Pavel Cheremushkin from Kaspersky Lab.
5 years ago
Pierre Ossman 259f1055cb Use size_t for lengths in stream objects
Provides safety against them accidentally becoming negative because
of bugs in the calculations.

Also does the same to CharArray and friends as they were strongly
connection to the stream objects.
5 years ago
Pierre Ossman 1d5aaf54f8 Add sanity checks for PixelFormat shift values
Otherwise we might be tricked in to reading and writing things at
incorrect offsets for pixels which ultimately could result in an
attacker writing things to the stack or heap and executing things
they shouldn't.

This only affects the server as the client never uses the pixel
format suggested by th server.

Issue found by Pavel Cheremushkin from Kaspersky Lab.
5 years ago
Pierre Ossman 9f7abaea3a Fix depth sanity test in PixelFormat 5 years ago
Pierre Ossman 1224cbdc21 Handle empty Tight gradient rects
We always assumed there would be one pixel per row so a rect with
a zero width would result in us writing to unknown memory.

This could theoretically be used by a malicious server to inject
code in to the viewer process.

Issue found by Pavel Cheremushkin from Kaspersky Lab.
5 years ago
Pierre Ossman 6a3f711878 Add write protection to OffsetPixelBuffer
No one should every try to write to this buffer. Enforce that by
throwing an exception if any one tries to get a writeable pointer
to the data.
5 years ago
Pierre Ossman 3282836baf Make ZlibInStream more robust against failures
Move the checks around to avoid missing cases where we might access
memory that is no longer valid. Also avoid touching the underlying
stream implicitly (e.g. via the destructor) as it might also no
longer be valid.

A malicious server could theoretically use this for remote code
execution in the client.

Issue found by Pavel Cheremushkin from Kaspersky Lab
5 years ago
matt 408c005d3e Initial commit 5 years ago