Before this commit it was possible to pass more or less arbitrary sized
strings as part of the Version message. This could lead to malicious
clients sending huge strings as part of this message.
The problem arises once these Strings are displayed in the UI (e.g. once
a user selects Information from the context menu of such a malicious
client). Qt will then be so busy to render this String that it
completely freezes the UI (#4067).
This commit prevents this attack by restricting the size of the Version
strings on the server side. If a client sends strings that exceed this
size, the server will drop the original content and replace it with a
generic "[[Invalid]]".
mumble_plugin_linux.h: free "path" only after we're done with "filename"
basename() returns a pointer to the position where the basename starts in the string passed as argument.
ChannelListener will be introduced with Mumble 1.4.0 but older clients
will not know what these are. Thus they won't show them in their UI
which could lead to users being listened to without noticing.
In order to solve this issue, this commit implements a logic on the
Server that'll inform older clients about this possibility by sending
them a TextMessage right after they have authenticated (and after they
have received the server's welcome text).
ChannelListener will be introduced with Mumble 1.4.0 but older clients
will not know what these are. Thus they won't show them in their UI
which could lead to users being listened to without noticing.
In order to solve this issue, this commit implements a logic on the
Server that'll inform older clients about this possibility by sending
them a TextMessage right after they have authenticated (and after they
have received the server's welcome text).
Supported are sections, inline code and code-blocks, bold, italic and
strikethrough text, links and quotes.
It is also possible to use the backslash character to escape other
characters (to prevent them from triggering Markdown interpretation).
The changes made in this commit do not apply to direct messages though
(which are assembled via a RichTextEditor and I haven't found a clever
way to hack into that one yet).
This implements #2945 and fixes#4075
Supported are sections, inline code and code-blocks, bold, italic and
strikethrough text, links and quotes.
It is also possible to use the backslash character to escape other
characters (to prevent them from triggering Markdown interpretation).
The changes made in this commit do not apply to direct messages though
(which are assembled via a RichTextEditor and I haven't found a clever
way to hack into that one yet).
This implements #2945 and fixes#4075
The idea here is that sometimes you really do have a lot of folks connecting from a single IP,
and if those connections are successful you don't want to ban any of them.
However, in cases where the server needs to guard against malicious users attempting a DDOS
by reconnecting their valid user account over and over, we need to be able to configure the
server to still ban those successful attempts.
The idea here is that sometimes you really do have a lot of folks connecting from a single IP,
and if those connections are successful you don't want to ban any of them.
However, in cases where the server needs to guard against malicious users attempting a DDOS
by reconnecting their valid user account over and over, we need to be able to configure the
server to still ban those successful attempts.
This PR fixes a compilation error that occurs when building murmur with GRPC enabled with an older version of the GRPC lib (probably a version less than 1.28 but I'm not sure of the exact version).
Furthermore it fixes a Qt warning about a deprecated function (Qt >= 5.14) in the GRPC code.
Finally it adds GRPC to be built on our CI in order to catch errors in the GRPC code in the CI as well.
We have had multiple cases now in which there have been some errors in
changes related to GRPC that weren't detected by the CI because it
excluded the GRPC code from the build process. This will bw changed now.
As all other CIs have been stubborn, for now we'll only build GRPC on
travis as these use a new-enough Ubuntu version to be able to build
GRPC.
MacOS CI I haven't got to work with the whole homebrew stuff and Windows
is done in its own repo (which I won't touch either).
m
It appears as if more modern versions of GRPC-c++ have moved their
classes from namespace grpc to namespace grpc_impl, which is what the
most recent contribution to this file was using. However in older
versions of the GRPC library this namespace doesn't exist yet and thus
causes compile errors.
Luckily it seems however that the GRPC devs were smart about this
change as they added typedefs to the grpc namespace (which still exists)
that reroute to the grpc_impl namespace. Thus we can simply use the grpc
namespace and in newer versions this will redirect us to the grpc_impl
namespace automatically.
As a reference on the GRPC side see
d684ddc7e3
Building a docker image with the current Dockerfile seems to run into
issues caused by not finding files on the Ubuntu disco repositories
anymore. So, this patch updates the Ubuntu version in the Dockerfile
from disco to latest.
The latest Ubuntu LTS Docker image is version 18.04 and will switch to
version 20.04 soon. The package names of libprotobuf and libgrpc differ
in version 18.04 and 20.04. As suggested by Bartosz Zieba, this patch
uses regex for installing these packages to make the Dockerfile work
with both LTS versions.
Co-authored-by: Bartosz Zieba <bartosz@zieba.pro>
Signed-off-by: hwipl <33433250+hwipl@users.noreply.github.com>
Building a docker image with the current Dockerfile seems to run into
issues caused by not finding files on the Ubuntu disco repositories
anymore. So, this patch updates the Ubuntu version in the Dockerfile
from disco to latest.
Signed-off-by: hwipl <33433250+hwipl@users.noreply.github.com>
This implements #3319 by allowing users to "listen" to a channel they have not joined. Doing so will place a "listener proxy" (in other software this is sometimes known as a "phantom") in that channel which will look like a normal user except that it'll have the same name as the user listening to that channel and an ear-icon instead of the normal avatar-icon. It will also always show a muted-icon next to it.
If a listener proxy is in a channel, the server will route all audio packets from that channel to the user the proxy belongs to (as if that user was in the channel). Note though that the opposite of this is not true: The users in the channel will not hear audio from the listening user unless that user decides to join the channel.
Furthermore it is possible to set a local volume adjustment for each individual listener proxy so that audio received through them can be tuned in volume.
Finally the ACLEditor is changed so that every time you fiddle with the Enter privilege, you'll also set the Listen privilege automatically. For why I think this to be necessary see the commit message of 77e89e4
This implements #3319 by allowing users to "listen" to a channel they
have not joined. Doing so will place a "listener proxy" (in other
software this is sometimes known as a "phantom") in that channel which
will look like a normal user except that it'll have the same name as the
user listening to that channel and an ear-icon instead of the normal
avatar-icon. It will also always show a muted-icon next to it.
If a listener proxy is in a channel, the server will route all audio
packets from that channel to the user the proxy belongs to (as if that
user was in the channel). Note though that the opposite of this is not
true: The users in the channel will not hear audio from the listening
user unless that user decides to join the channel.
Furthermore it is possible to set a local volume adjustment for each
individual proxy that will be applied to all audio that is received
through it.
Libraries were already in versioned directories, but in recent versions of the Windows 10 SDK that's the case for executables and includes as well.
This commit also removes duplicate backslashes in the paths. Fortunately it was only a cosmetic issue (in the console output).
Before it was only possible to set hotkeys for whispering/shouting to
fixed targets (e.g. a certain list of users or a certain channel).
This commit adds the possibility to set up a hotkey to whisper/shout to
whatever is the current selection in the UI. That means if I have
another user selected, then I'll whisper to that user and if I have a
channel selected, then I'll shout to that instead.
Having the server perform 2 syscalls per TCP audio packet is extreme - turning this
off led to 30% lower CPU utilization in a test with 200 music-playing bots.
Switching to TCP_NODELAY for all packets is probably a win as well - TCP is only
typically used for control packets like users joining and leaving channels, of
which there are few. (As alluded to above, TCP is also sometimes used for audio,
in which case it should be in TCP_NODELAY mode anyway).
g.iTarget is not protected by a lock or a Mutex. This means that it can
change its value while AudioInput::encodeAudioFrame is running. However
the value is accessed at multiple stages (including
AudioInput::flushCheck that is called from encodeAudioFrame) meaning
that there could be inconsistencies of what g.iTarget was meaning for
this audio frame.
This commit makes sure that g.iTarget is only accessed once at the
beginnign of AudioInput::encodeAudioFrame and then copied to a local
variable which is then used for all the places in which g.iTarget
previously was access directly.
One scenario this race condition could be observed was pressing and
immediately releasing a whisper shortcut. This could sometimes cause one
of the whisper frames (the second last to be more precise) to be sent as
normal audio instead of whispering (the last message would have been
affected by this as well however for that there's a special workaround
in place already [9d16137393] which
covered the effects of the racecondition for that one).
In order to send the last audio frame of a whisper-action to the correct
target, we have to do some workaround introduced in
9d16137393. The current implementation
bleeds into normal speech, if VoiceActivation is used (#2604).
This is due to iPrevTarget not getting reset automatically once it has
fulfilled its purpose. If PTT is used as transmission mode, it doesn't
matter as the button-pushing also resets iPrevTarget as needed.
VoiceActivation doesn't do that though, so this commit adds a little
housekeeping to the iPrevTarget logic.