Commit Graph

8826 Commits

Author SHA1 Message Date
Davide Beatrici
4fc7df5dde FEAT: Improve OSInfo so that architecture and OS are properly reported
This originally started as a Linux-only improvement (support for "/etc/os-release"), but it became pretty clear that OSInfo was not in a pretty state.

Please note that the auto-update system is not affected, because it doesn't rely on OSInfo.

The most important change involves the OS name.
Before this commit we had "Win32", "WinX64", "OSX" and "X11". The latter was particularly misleading now that Wayland is a thing.
We now have "Windows", "Linux", "macOS", "FreeBSD", "NetBSD", "OpenBSD", "BSD", "UNIX" and "Unknown".

The second most important change is the way we retrieve the version on OSes other than Windows and macOS.
OSInfo had several methods, but none was aware of "/etc/os-release". We initially wanted to implement a new method, to be used as primary, that gathers info from that file.
However, we later realized we can just use QSysInfo because it does exactly what we planned to do on our own.
The reason why we're retaining our own methods for Windows and macOS is because they're MUCH more descriptive. For example, the build number is not in the strings returned by QSysInfo.
In order to make the code easier to read, the parts that handled versions of Windows we no longer support is removed.

The final change is about the info that is sent to our server.
"is64bit" was set to the correct value on all platforms except for Windows, because IsWow64Process() returns true only when the process is 32 bit and running on a 64 bit OS.
"arch" and "osarch" are introduced and represent the architecture of the program and the OS, respectively. "is64bit" is removed as it's now redundant.
"osverbose" is also introduced and represents the full operating system version.
2021-02-12 08:27:15 +01:00
Davide Beatrici
51c6880414
Merge PR #4746: CI: Update to FreeBSD 12.2 2021-02-11 04:09:47 +01:00
Davide Beatrici
e69259bada
Merge PR #4741: FIX(installer): Change version regex so that it accepts multiple digits 2021-02-10 20:31:17 +01:00
Robert Adam
2f03b5999c CI: Update to FreeBSD 12.2
According to https://www.freebsd.org/releases/ 12.1 is no longer
supported.

This also seemed to cause some problems in the most recent runs of the
Cirrus CI tasks.

Thus this commit updates the used version to 12.2
2021-02-10 19:33:12 +01:00
Davide Beatrici
9cc486f24f FIX(installer): Change version regex so that it accepts multiple digits
Now that we reached build number 10 the current expression is not valid anymore.

As a result, the version is not set and the build fails.

This commit rewrites the regex so that it accepts multiple digits and is also shorter.

Co-Authored-By: Jan Klass <kissaki@posteo.de>
2021-02-08 00:01:07 +01:00
Robert Adam
817d2c1a03
Merge pull request #4733: FIX(client): Only allow "http"/"https" for URLs in ConnectDialog
Our public server list registration script doesn't have an URL scheme whitelist for the website field.

Turns out a malicious server can register itself with a dangerous URL in an attempt to attack a user's machine.

User interaction is required, as the URL has to be opened by right-clicking on the server entry and clicking on Open Webpage.

This PR introduces a client-side whitelist, which only allows http and https schemes. We will also implement it in our public list.

In future we should probably add a warning QMessageBox informing the user that there's no guarantee the URL is safe (regardless of the scheme).

Thanks a lot to https://positive.security for reporting us the RCE vulnerability privately.
2021-02-06 14:34:35 +01:00
Robert Adam
0364272d00 TRANSLATION: Update translation files
Scanning directory './src'...
Scanning directory './src/mumble'...
Updating 'src/mumble/mumble_en.ts'...
    Found 1929 source text(s) (3 new and 1926 already existing)
2021-02-06 11:45:55 +01:00
Davide Beatrici
fe7d212b95 FIX(client): Only allow "http"/"https" for URLs in ConnectDialog
Our public server list registration script doesn't have an URL scheme
whitelist for the website field.

Turns out a malicious server can register itself with a dangerous URL in
an attempt to attack a user's machine.

User interaction is required, as the URL has to be opened by
right-clicking on the server entry and clicking on "Open Webpage".

This commit introduces a client-side whitelist, which only allows "http"
and "https" schemes. We will also implement it in our public list.

In future we should probably add a warning QMessageBox informing the
user that there's no guarantee the URL is safe (regardless of the
scheme).

Thanks a lot to https://positive.security for reporting the RCE
vulnerability to us privately.
2021-02-06 11:45:55 +01:00
Davide Beatrici
002a527733
Merge PR #4722: FEAT(client): Introduce GlobalShortcutButtons, for better shortcut management 2021-02-05 20:44:08 +01:00
Robert Adam
b6353420f2
Merge pull request #4720: FIX(ocb2): Work around packet loss due to OCB2 XEX* mitigation
The mitigation for vulnerabilities discovered in
OCB2 (https://eprint.iacr.org/2019/311, called XEX* attack, or XEXStarAttack, in code)
introduced in be97594 (#4227) willingly allowed for some packets with specific
characteristics to be dropped during encryption to prevent the vulnerability
from being exploited.
It was assumed that the chance of such packets was sufficiently small (given
we are dealing with compressed audio) that such loss was acceptable.

It was however discovered that digital silence (as produced by e.g. a noise
gate) will cause Opus to emit almost exclusively such packets, leading to strong
artifacts on the receiving end. See #4385.

This commit tries to work around the issue by modifying such packets in a way
which will no longer require them to be dropped, and yet produce the expected
output on the receiver side.
As far as I understand Opus (specifically section 4.1, 4.3.0 and 4.3.3), the
0s are simply unused bits and are only there because we running Opus in constant
bitrate mode. So, flipping one of them should have no effect on the resulting
audio.

Fixes #4719
2021-02-05 15:46:26 +01:00
Davide Beatrici
01ed5e99cc TRANSLATION: Update translation files
Scanning directory './src'...
Scanning directory './src/mumble'...
Updating 'src/mumble/mumble_en.ts'...
    Found 1937 source text(s) (15 new and 1922 already existing)
    Removed 4 obsolete entries
2021-02-05 03:36:02 +01:00
Davide Beatrici
2e04d1e23f FEAT(client): Update platform-specific GlobalShortcut backends for ButtonInfo 2021-02-05 03:35:58 +01:00
Davide Beatrici
0d125a3c30 FEAT(client): Use GlobalShortcutButtons in AudioWizard and GlobalShortcut
GlobalShortcut::buttonName() and GlobalShortcut::buttonText() are removed in favor of GlobalShortcut::buttonInfo().

The new function returns a ButtonInfo structure, which contains two strings: one identifies the device, the other one the button.

ShortcutKeyWidget is removed, as replaced by GlobalShortcutButtons.
2021-02-05 03:32:14 +01:00
Davide Beatrici
a7f98517b5 FEAT(client): Introduce GlobalShortcutButtons, for better shortcut management
This is a dialog that allows to efficiently view/add/remove buttons for a specific shortcut.

The tree design allows to easily identify the buttons and the device they're attached to.

The capture process can be started by pressing on "Add".
Once all buttons are released the process stops automatically.

There's only a cosmetic issue, that should be fixed in our theme: no distinction between active and focused QPushButton.
2021-02-05 03:32:13 +01:00
Jonas Herzig
8990f5a57b FIX(ocb2): Work around packet loss due to OCB2 XEX* mitigation
The mitigation for vulnerabilities discovered in
OCB2 (https://eprint.iacr.org/2019/311, called XEX* attack, or XEXStarAttack, in code)
introduced in be97594 (#4227) willingly allowed for some packets with specific
characteristics to be dropped during encryption to prevent the vulnerability
from being exploited.
It was assumed that the chance of such packets was sufficiently small (given
we are dealing with compressed audio) that such loss was acceptable.

It was however discovered that digital silence (as produced by e.g. a noise
gate) will cause Opus to emit almost exclusively such packets, leading to strong
artifacts on the receiving end. See #4385.

This commit tries to work around the issue by modifying such packets in a way
which will no longer require them to be dropped, and yet produce the expected
output on the receiver side.
As far as I understand [Opus] (specifically section 4.1, 4.3.0 and 4.3.3), the
0s are simply unused bits and are only there because we running Opus in constant
bitrate mode. So, flipping one of them should have no effect on the resulting
audio.

[Opus]: https://tools.ietf.org/html/rfc6716

Fixes #4719
2021-02-04 23:48:03 +01:00
Robert Adam
21fbacc7ea
Merge pull request #4731: TRANSLATION: Remove empty nl_BE file
This language no longer exists on Transifex. (Removed empty duplicate to more generic language without locale.)
The file seems to not contain any translations.
There is the more general nl translation file.
2021-02-04 09:06:48 +01:00
Jan Klass
629ff23c43 TRANSLATION: Remove empty nl_BE file
This no longer exists on Transifex.
The file seems to not contain any translations.
There is the more general nl translation file.
2021-02-04 00:44:38 +01:00
Robert Adam
803dd6db62
Merge pull request #4730: TRANSLATION: Drop outdated translation file references
Previously, duplicate translation files were removed in three commits:
b208fe0 ca_ES
70091f8 el_GR
c043423 nb_NO

These files were not removed from the CMakeLists.txt and translations.pri.
2021-02-03 13:17:40 +01:00
Jan Klass
05e281d740 TRANSLATION: Drop outdated translation file references
Previously, duplicate translation files were removed in three commits:
b208fe09d1 ca_ES
70091f8fea el_GR
c0434236f1 nb_NO

These files were not removed from the CMakeLists.txt and translations.pri.
2021-02-02 23:13:18 +01:00
Robert Adam
07e68ea39e
Merge pull request #4729: TRANSLATION: Remove empty translations
These were requested and approved at some point in Transifex.
However, no work was ever done on translating to them.

With the imminent move to another translation platform,
we take this opportunity to prune empty translations from it.

These translations can be added upon request again, just like any other.
But they served no value as empty, dead translation files with no progress.
2021-02-02 19:38:40 +01:00
Jan Klass
c0b899a902 TRANSLATION: Remove empty translations
These were requested and approved at some point in Transifex.
However, no work was ever done on translating to them.

With the imminent move to another translation platform,
we take this opportunity to prune empty translations from it.

These translations can be added upon request again, just like any other.
But they served no value as empty, dead translation files with no progress.
2021-02-02 01:03:34 +01:00
Robert Adam
68f8cd3f0d
Merge pull request #4724: CI(windows): Fix build number fetching script
I have no idea why but these changes make this work on my Windows 10 VM.
If this really solves the issue then this is a perfect illustration for
why batch is weird.
2021-01-29 17:24:58 +01:00
Robert Adam
7280013efe CI(windows): Fix build number fetching script
I have no idea why but these changes make this work on my Windows 10 VM.
If this really solves the issue then this is a perfect illustration for
why batch is weird.
2021-01-29 11:19:20 +01:00
Davide Beatrici
799559844c
Merge PR #4721: REFAC(client): Move CompletablePage class into dedicated file set 2021-01-27 19:43:56 +01:00
Davide Beatrici
84e10f7ca3 REFAC(client): Move CompletablePage class into dedicated file set
The class was defined in AudioWizard.cpp/.h, however AudioWizard is not the only user.

In fact, Cert.ui had to include AudioWizard.h in order to make use of CompletablePage.

This commit moves the class into a dedicated file set and changes the include header in AudioWizard.ui and Cert.ui.
2021-01-26 22:37:43 +01:00
Davide Beatrici
d40a19eb88
Merge PR #4713: BUILD(installer): Include g15-helper 2021-01-26 20:49:37 +01:00
Davide Beatrici
732cc7bc73
Merge PR #4718: CI(azure): Fix VERSION variable not being expanded correctly in curl call 2021-01-24 21:37:46 +01:00
Davide Beatrici
215220f480 CI(azure): Fix VERSION variable not being expanded correctly in curl call
On Windows (Batch) the syntax was correct, but mumble-version.py was not being executed due to the path using a slash instead of a backslash.

On UNIX (Bash) the syntax was incorrect: https://unix.stackexchange.com/questions/88452/concatenating-two-variables-with-an-underscore

Co-authored-by: Robert Adam <dev@robert-adam.de>
2021-01-24 20:15:17 +01:00
Robert Adam
b06aa6a11a BUILD(installer): Include g15-helper
Fixes #4708
2021-01-23 20:20:17 +01:00
Davide Beatrici
bc6b6a3a75
Merge PR #4715: CI(azure): Simplify and improve job name for Windows builds 2021-01-23 19:56:47 +01:00
Davide Beatrici
9be37c9f23 CI(azure): Simplify and improve job name for Windows builds
This fixes the last build failure, which was due to the job's display name containing spaces.

"x86_64" is changed to "x64" as the latter appears to be the most common identifier for the architecture, at least for Windows.
2021-01-23 00:24:45 +01:00
Robert Adam
4b533dce52
Merge pull request #4711: CI(azure): Export BUILD_NUMBER_TOKEN correctly
Turns out environment variables cannot be exported globally:

"/.ci/azure-pipelines/main.yml (Line: 7, Col: 1): Unexpected value 'env'"

It has to be done for each step that makes use of the variable.

Furthermore if a variable is not defined on Azure, the expansion
$(MY_VARIABLE) does not resolve to an empty String (as is the case e.g.
in Bash) but this expression is then taken literally without any
expansion at all. Therefore we have to make sure that the
BUILD_NUMBER_TOKEN variable is always defined. Thus we define it in
main-pr.yml as for PRs we don't define it on Azure.

In order for these variables to not interfere with each other, the
variable name inside the scripts was prefixed with MUMBLE_
2021-01-22 10:06:09 +01:00
Davide Beatrici
5d8d17a45a CI(azure): Fix usage of BUILD_NUMBER_TOKEN
Turns out environment variables cannot be exported globally:

"/.ci/azure-pipelines/main.yml (Line: 7, Col: 1): Unexpected value 'env'"

It has to be done for each step that makes use of the variable.

Furthermore if a variable is not defined on Azure, the expansion
$(MY_VARIABLE) does not resolve to an empty String (as is the case e.g.
in Bash) but this expression is then taken literally without any
expansion at all. Therefore we have to make sure that the
BUILD_NUMBER_TOKEN variable is always defined. Thus we define it in
main-pr.yml as for PRs we don't define it on Azure.

In order for these variables to not interfere with each other, the
variable name inside the scripts was prefixed with MUMBLE_
2021-01-22 09:08:46 +01:00
Davide Beatrici
75ed614261
Merge PR #4705: FIX(client): Ancient notification icon names 2021-01-21 19:01:09 +01:00
Robert Adam
0b352ebee5
Merge pull request #4707: DOCS: fixed typos 2021-01-21 17:43:13 +01:00
freddii
9889a0fa99 DOCS: fixed typos 2021-01-20 22:17:38 +01:00
V
860e4f9d4a FIX(client): Ancient notification icon names
These no longer exist in contemporary icon themes like Adwaita.

Per https://developer.gnome.org/gtk3/stable/gtk3-Stock-Items.html
and https://specifications.freedesktop.org/icon-naming-spec/latest/ar01s04.html
2021-01-19 14:21:08 +01:00
Robert Adam
4b36f0f9a7
Merge pull request #4700: FIX(server): Make max bandwidth the highest supported
558000 = 510000 (Opus) + 9600 (position) + 38400 (TCP overhead)

Closes #3895
2021-01-18 12:16:22 +01:00
TredwellGit
99ea9d7835 FIX(server): Make max bandwidth the highest supported
Closes https://github.com/mumble-voip/mumble/issues/3895
2021-01-18 09:27:49 +00:00
Robert Adam
1455b39698
Merge pull request #4696: FIX: Remove Qt 4 leftover 2021-01-17 12:05:14 +01:00
Robert Adam
2d3d8c2d0e
Merge pull request #4692: DOCS: Added notes how to build specific versions/commits. 2021-01-17 11:14:46 +01:00
Thomas Lange
f0f2125eb9 FIX: Remove Qt 4 leftover 2021-01-16 21:25:12 +01:00
Tobias Gerold
96ea146c51 DOCS(dev): Added a tip linking to faq part of building specific versions/commits to "build-instructions/README.md"
Signed-off-by: Tobias Gerold <tobias@g3ro.eu>
2021-01-16 21:17:09 +01:00
Tobias Gerold
a79f87b000 DOCS(dev): Added instructions for building specific versions/commits to "build-instructions/faq.md".
Signed-off-by: Tobias Gerold <tobias@g3ro.eu>
Co-authored-by: Robert Adam <dev@robert-adam.de>
2021-01-16 21:14:29 +01:00
Davide Beatrici
2fdd96b200
Merge PR #4676: FEAT(client, mac): Prompt user for microphone permission if not granted. 2021-01-16 06:30:17 +01:00
Robert Adam
047884fecf
Merge pull request #4690: FEAT(client): Add new icons to "What's this?"
The following icons were added (with a description) to Qt's "What's
this?" help system:

- padlocks (#3929)
- talking state for locally muted users (#4322)
- listener symbol (#4011)

Fixes #4686
2021-01-15 07:57:54 +01:00
Robert Adam
c219b6ce29
Merge pull request #4691: DOCS: Fix vcpkg paths in build documentation
We used mumble-vcpkg while the get script was still being implemented in a separate repository.
When we integrated it in this repository in 2f45772 it was already, and still is, using vcpkg.
2021-01-14 21:49:04 +01:00
Robert Adam
4abbcf8754 TRANSLATION: Update translation files
Scanning directory './src'...
Scanning directory './src/mumble'...
Updating 'src/mumble/mumble_en.ts'...
    Found 1925 source text(s) (4 new and 1921 already existing)
2021-01-14 20:31:25 +01:00
Jan Klass
550903c3f1 DOCS: Fix vcpkg paths in build documentation
We used mumble-vcpkg while the get script was still being implemented in a separate repository.
When we integrated it in this repository in 2f45772c9c it was already, and still is, using `vcpkg`.
2021-01-14 19:57:06 +01:00
Robert Adam
c8e8a84f11
Merge pull request #4689: FIX(server): Older clients not being warned about ChannelListener
Clients < 1.4.0 don't know about the new ChannelListener feature and
thus there is no indication in the UI for them. In order to make sure
that users know that they could potentially be listened to without
seeing anything in the UI, a warning message was introduced in #4097.

There was an error in the implementation however causing this warning to
not be sent by the server if there are no explicit limits on the amount
of channel listeners via the server configuration.

The bug was that "no limit" was expressed as -1 but the check for
whether these features are enabled checked for > 0. The fix is simply to
check for != 0 instead.

Fixes #4687
2021-01-14 11:06:17 +01:00