| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
The reason for this is to keep a consistency through out the project.
|
|
|
|
|
|
|
|
| |
There were more unclear usage of this exception class, and since nothing
catches it it is very unclear what the purpose is. Go ahead and just
remove it.
Follow-up to bcaaea7.
|
|
|
|
|
|
|
|
| |
This prefix often just added noise, and could sometimes be added
multiple times. It's better that user interface catch the specific
exception type and give a more descriptive presentation to the user.
This is partially a revert of 1922550.
|
|
|
|
|
| |
It's a source of confusion and possibly bugs to reuse the same variable
name for multiple things.
|
|
|
|
|
| |
Let's avoid reimplementing something basic that's available in the
standard library. It also makes the code easier to read.
|
|
|
|
|
| |
It's more readable than 0, and a bit safer than NULL, so let's try to
follow modern norms.
|
|\ |
|
| |
| |
| |
| |
| |
| | |
One-shot timers are more common, so let's change the API a bit to make
that use case simpler. This API also makes it more clear what is
happening.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Specifies that the server must ignore all keyboard or mouse events sent
by the client.
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2180903
Signed-off-by: Carlos Santos <casantos@redhat.com>
|
|/
|
|
|
|
|
|
|
| |
They must belong to the rfb namespace, not to the SConnection class.
Also add an AccessNone constant, since it's better to use a mnemonic
symbol rather than zero to initialize the accessRights members.
Signed-off-by: Carlos Santos <casantos@redhat.com>
|
|
|
|
|
|
| |
We should handle this in the low-level protocol code as much as possible
to avoid mistakes. This way the rest of the code can assume that strings
are always UTF-8 with \n line endings.
|
|
|
|
|
| |
These will always be byte streams at heart, so let's try to keep them
with a proper type. Should make it clearer how they will be used.
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
These files don't use anything from this header, so remove the include.
This exposes some missing includes in other places, though. So add an
explicit include in the files that were relying on an indirect
inclusion.
|
| |
| |
| |
| |
| | |
Avoids a bit of complexity by delegating that handling to a string
object.
|
| |
| |
| |
| |
| | |
Let's use a more common type instead of something homegrown. Should be
more familiar to new developers.
|
| |
| |
| |
| |
| |
| | |
We mostly use classical C strings, but the memory management around them
can get confusing and error prone. Let's use std::string for the cases
where we need to return a newly allocated string.
|
| |
| |
| |
| |
| | |
Avoid having our own custom stuff and instead use the modern, standard
types, for familiarity.
|
|/
|
|
|
|
| |
An assert will kill the entire server, which is overly harsh when there
is a problem with a single connection. Instead, throw an exception which
will just disconnect that specific client.
|
|
|
|
|
| |
This allows us to separate accidentally unused, from explicitly unused
parameters, which allows us to turn on such checks in the compiler.
|
|
|
|
| |
The flags should always be empty anyway.
|
|
|
|
|
| |
These checks depend on accessRights being set up, this has only happened
if we have done the QUERYING steps.
|
|
|
|
|
| |
Properties should be initialized in order to avoid random values in
case they are used earlier than expected.
|
|
|
|
|
|
| |
The generally recommended way is to include it from source files, not
headers. We had a mix of both. Let's try to be consistent and follow the
recommended way.
|
|\ |
|
| | |
|
| |
| |
| |
| | |
This was out of sync with the client handling for no good reason.
|
| |
| |
| |
| |
| | |
The peer expects a response, so we should also be able to respond that
there is no clipboard data currently available.
|
| |
| |
| |
| |
| |
| | |
The extended clipboard protocol has the ability for the peer to request
things to be sent automatically, without a request message. Make sure we
honor such settings.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Major restructuring of how streams work. Neither input nor output
streams are now blocking. This avoids stalling the rest of the client or
server when a peer is slow or unresponsive.
Note that this puts an extra burden on users of streams to make sure
they are allowed to do their work once the underlying transports are
ready (e.g. monitoring fds).
|
| |
| |
| |
| |
| | |
These are not universal in the protocol so having functions for them
only obfuscates things.
|
| |
| |
| |
| |
| |
| | |
Some systems (like TLS) need to send some final data before closing
a connection. Make sure this is properly handled by cleaning up the
security object before closing the underlying network socket.
|
| |
| |
| |
| | |
Otherwise we might send duplicate result codes and other weird things.
|
|/
|
|
|
| |
It's a generic feature that is better handled as part of SConnection's
state machine.
|
|
|
|
|
|
|
| |
Implements support in both client and server for the extended
clipboard format first seen in UltraVNC. Currently only implements
text handling, but that is still an improvement as it extends the
clipboard from ISO 8859-1 to full Unicode.
|
|
|
|
|
| |
In prepartion for better clipboard extensions that can send Unicode
data between the client and server.
|
|
|
|
|
| |
Change the internal clipboard API to use a request based model in
order to be prepared for more advanced clipboard transfers.
|
|
|
|
|
|
|
| |
This provides some basic rate limiting that will make it difficult
for an attacker to brute force passwords. Only relevant when the
blacklist is disabled as otherwise the attacker only gets a very
limited number of attempts.
|
|\ |
|
| |
| |
| |
| |
| |
| | |
Make sure all methods only write what is given as arguments, and
avoid side effects by getting data from parameter objects. This keeps
things readable in the calling code.
|
| |
| |
| |
| |
| |
| | |
Now that we've split out server state to ServerParams, ConnParams
only contains state for a client. Rename the class and variables
to reflect this.
|
| |
| |
| |
| |
| | |
That object is just a container for the current state. Move the I/O
to the classes already doing such stuff.
|
| |
| |
| |
| | |
It is static and only used from a single place, so let's inline it.
|
|/
|
|
|
| |
This makes it generally useful and other code doesn't have to
know of the specific sub-class.
|
|
|
|
|
| |
There is already an implicit connection between them, so let's make
it explicit. This allows easy lookup outside of the processMsg() function.
|
|
|
|
|
| |
These are just confusing and obfuscating. Do a normal delete of
these objects instead.
|
|
|
|
|
| |
Include the type of exception in the string generated by each
subclass. Also simplify the constructs to what is needed.
|
|
|
|
|
|
| |
This adds the basic infrastructure and handshake for the QEMU
Extended Key Events extension. No viewer or server makes use of
the extra functionality yet though.
|
|
|
|
|
|
| |
They are created in SConnection's and CConnection's constructors but never destroyed.
There is no reason for the indirection, so lets make them direct members.
|
| |
|