Commit Graph

8051 Commits

Author SHA1 Message Date
Robert Adam
466479992d src/murmur/Messages.cpp: Restrict string sizes for Version information
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]]".
2020-04-24 11:08:58 +02:00
Robert Adam
2321aecd78
Merge pull request #4099: free "path" only after we're done with "filename"
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.
2020-04-24 09:55:01 +02:00
Davide Beatrici
e1da53f597 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.
2020-04-24 07:59:24 +02:00
Robert Adam
33234636c3
Merge pull request #4095: Optional start menu shortcut for installer
Installer: Make creation of start menu entry optional
2020-04-23 20:26:16 +02:00
trudnorx
84b505cbd7 Installer: Make creation of start menu entry optional 2020-04-23 19:12:49 +02:00
Robert Adam
ae3e222c73
Merge pull request #4097: Warn older clients about ChannelListenersChannelListener will be introduced with Mumble
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).
2020-04-22 19:24:53 +02:00
Robert Adam
db465f0b42 src/murmur/Messages.cpp: Warn older clients about ChannelListener feature
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).
2020-04-22 18:23:29 +02:00
Robert Adam
c1359c91f0
Merge pull request #4096: Installer: Do not delete murmur.ini
Fixes #4090.
2020-04-22 18:21:58 +02:00
trudnorx
e799cc320d Installer: Don't delete murmur.ini when uninstalling Mumble 2020-04-22 17:04:24 +02:00
Robert Adam
97b3456552
Merge pull request #4076: Markdown support
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
2020-04-22 14:44:48 +02:00
Robert Adam
2da3f0d39e src/mumble/TextMessage.cpp: Implemented Markdown support for TextMessages
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
2020-04-22 14:01:49 +02:00
Robert Adam
c84f0a5ebf
Merge pull request #4087: Add autobanSuccessfulConnections flag.
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.
2020-04-21 09:59:47 +02:00
Sean Talts
6c6a591826 src/murmur/Meta.cpp: Negative values of these settings don't make sense.
Instead, we'll turn off the autoban feature if either are negative.
2020-04-20 15:06:07 -04:00
Sean Talts
37d24f6bf2 src/murmur: Add autobanSuccessfulConnections flag.
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.
2020-04-20 15:05:04 -04:00
Robert Adam
35c1d01b21
Merge pull request #4082: Fix grpc build
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.
2020-04-20 13:01:25 +02:00
Robert Adam
4ab0e03492 CI: Include GRPC support
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
2020-04-20 12:07:26 +02:00
Robert Adam
fa8e9b2fcb src/murmur/MurmurGRPCImpl.cpp: Use QAtomicInteger::loadRelaxed() instead of QAtomicInteger::load() for Qt >= 5.14 2020-04-20 08:51:21 +02:00
Robert Adam
45e76ce49e src/murmur/MurmurGRPCImpl.h: Use namespace grpc instead of grpc_impl
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
2020-04-20 08:41:14 +02:00
Robert Adam
60677690b7
Merge pull request #4074: Dockerfile: update ubuntu version to latest
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.
2020-04-18 16:43:21 +02:00
hwipl
2a83c13a22 Dockerfile: use regex for protobuf and grpc package names
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>
2020-04-18 16:15:41 +02:00
hwipl
d75efe0eac Dockerfile: update ubuntu version to latest
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>
2020-04-18 11:49:25 +02:00
Robert Adam
2c22eec085
Merge pull request #4011: Channel Listeners
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
2020-04-17 10:46:17 +02:00
Robert Adam
9f50a4cb4d Translation update
Updating 'mumble_en.ts'...
    Found 1738 source text(s) (17 new and 1721 already existing)
    Removed 1 obsolete entries
2020-04-16 09:29:49 +02:00
Robert Adam
8aadee917d Feature: Channel Listeners
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.
2020-04-16 09:29:49 +02:00
Robert Adam
7ed7d95f4b
Merge pull request #4059: Update GTA V Plugin 2020-04-10 16:55:40 +02:00
Robert Adam
79152903bf
.github/stale.yml: Configure stale-bot 2020-04-10 10:08:07 +02:00
Davide Beatrici
1c729dae2e
Merge PR #4056: qmake: fix paths in toolchains to support recent Windows SDK versions 2020-04-10 09:33:41 +02:00
Magnus Groß
df14e1ae4e Update GTA V Plugin 2020-04-09 20:51:36 +02:00
Robert Adam
dcd5842008 src: Use enum values instead of magic numbers for speech flags 2020-04-09 19:38:29 +02:00
Robert Adam
14e6e6ac99
Merge pull request #4048: Whisper to selection 2020-04-09 19:23:12 +02:00
Robert Adam
d635e98c7c
Merge pull request #4058: Add alias for places/network-workgroup.svg 2020-04-09 16:35:48 +02:00
Robert Adam
6b26bea502 themes: Add alias for places/network-workgroup.svg
This icon is referenced/needed from ConnectDialog and before this
commit, an error would be printed that this icon can't be found (#4057).
2020-04-09 14:27:53 +02:00
Davide Beatrici
1d67ebc6a5 qmake: fix paths in toolchains to support recent Windows SDK versions
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).
2020-04-09 10:55:02 +02:00
Robert Adam
954299d2e7 Translation update
Updating 'mumble_en.ts'...
    Found 1726 source text(s) (7 new and 1719 already existing)
    Removed 3 obsolete entries
2020-04-09 10:52:30 +02:00
Robert Adam
e5fa5a4a06 src/mumble: Implemented #1548: Whisper/Shout to selection
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.
2020-04-09 10:52:30 +02:00
Robert Adam
31fa3d524d Documentation: Added some explainatory comments to how VoiceTarget IDs are assigned 2020-04-09 10:52:30 +02:00
Robert Adam
f66abba853 src/mumble/UserModel: Added functions to retrieve the current selection 2020-04-09 10:52:30 +02:00
Davide Beatrici
9755cfa5a7
Merge PR #4054: Use TCP_NODELAY by default and remove attempts to flush. 2020-04-07 21:28:43 +02:00
Sean Talts
386ee52baf Use TCP_NODELAY by default and remove attempts to flush.
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).
2020-04-07 15:03:13 -04:00
Robert Adam
ed1b852aa2
Merge pull request #4053: Moved concurrent dependency to other Qt deps 2020-04-07 16:29:04 +02:00
Robert Adam
5ac7a875a9
Merge pull request #4050: Fix last audio frame target 2020-04-07 14:01:53 +02:00
Robert Adam
9176614493 src/mumble/mumble.pro: Moved concurrent dependency to other Qt deps 2020-04-07 13:39:12 +02:00
Robert Adam
389b35d521
Merge pull request #4051: Fix racecondition for g.iTarget 2020-04-07 13:23:21 +02:00
Robert Adam
eb32e5adcb src/mumble/AudioInput: Fix racecondition for g.iTarget
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).
2020-04-07 12:38:48 +02:00
Robert Adam
e43108a16f src/mumble/AudioInput.cpp: Fix whisper-target logic interfering with normal speech
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.
2020-04-07 12:23:26 +02:00
Robert Adam
a326ead1b9 src/mumble: Added some documentation on speech-detection and how iPrevTarget works 2020-04-07 12:23:26 +02:00
Robert Adam
371ebc2e0d
Merge pull request #3987: Make VersionCheck prepare asynchronously 2020-04-07 11:13:04 +02:00
Robert Adam
005cdfc34e
Merge pull request #4026: Improve log message style 2020-04-06 16:32:41 +02:00
Robert Adam
165fe093d0
Merge pull request #4041: Fix overlay start 2020-04-06 09:53:21 +02:00
Robert Adam
3ade7355f7
Merge pull request #4038: src: Fix for b263b91 2020-04-06 09:22:23 +02:00