Commit Graph

15 Commits

Author SHA1 Message Date
Robert Adam
748a003ff4 Merge branch 'master' into refac-database 2025-02-15 16:40:52 +01:00
Hartmnt
fe5fe6840e CHANGE(client): Migrate boost::filesystem to std
Since we are now using C++17, we can make use of the
std::filesystem::path API for use with our std::fstreams.

This commit replaces boost::filesystem::path introduced by
a08a26efcc
with std::filesystem::path
2024-12-05 22:27:03 +00:00
Hartmnt
a08a26efcc FIX(client): Fix Windows Unicode paths when using raw file streams
Presumably a recent Windows update broke the way we were using
filepaths. Specifically, the internal representation of non-ASCII
characters is weird in Windows and not UTF-8.
Why the code we had ever worked before is unclear, but it is now
broken either way.

This commit introduces the boost::filesystem::path abstraction
to handle the creation of raw output files gracefully on all
platforms.

Fixes #6628
2024-12-05 22:23:08 +00:00
Robert Adam
330c356e71 MAINT: Remove copyright year from all copyright notices
Keeping these up-to-date is just super tedious and they don't really
fulfill any purpose these days.
2024-09-30 18:06:20 +02:00
Robert Adam
942a4a4cda Remove minor formatting inconsistencies 2024-08-24 15:01:17 +02:00
Robert Adam
fb43ee4542 FIX(server): Stale username cache-entries due to case differences
Mumble treats usernames case-insensitively. However, in the server,
there is a cache that maps usernames to IDs of registered users. We do
lazy loading so when a given name is not yet in the cache, we check the
database for a match and if that returns something, we insert the result
into the cache. However, the DB does case-insensitive lookups whereas
the cache used to be case-sensitive. Therefore, different casings of the
same username could end up in the cache (all pointing to the same user
ID). If that user got unregistered, only one of the possible ways of
writing their name gets removed from the cache, leaving the other
entries (which are now stale) untouched.

This can cause problems when another user now wants to register with a
name that corresponds to one of those stale cache entries. The server
will think that the given username is already taken, ensuring leading to
a rejection of the registration request.

A server restart purges the stale entries from the cache.

This commit ensures that the cache is now also operating in a
case-insensitive manner such that we shouldn't ever create any duplicate
entries in there in the first place.

Fixes #6383
2024-08-20 19:36:06 +02:00
Robert Adam
b5a67c05fb REFAC: Fix tons of warnings and non-portable code
In various places we relied on compiler extensions such as
variable-length arrays on the stack or using non-standard escape
sequences. In order to make our code as portable as possible, these
parts of the code have been refactored to only use standard C++.

Furthermore, the new warning settings triggered a bunch of new warnings
all over the place that have been addressed by this commit.
2024-01-07 17:10:11 +01:00
Robert Adam
249d2c6298 MAINT: Update copyright headers to 2023 2023-01-08 15:54:35 +01:00
Robert Adam
d100ff1467 MAINT: Update copyright to 2022 2022-01-04 20:17:33 +01:00
Robert Adam
923045ac60 FORMAT: Run clang-format 10 on all source files 2021-04-16 21:05:52 +02:00
Robert
56db3410c5 MAINT: Update copyright notice to 2021 (Part II)
Apparently the first commit (59ae429972)
did not include all files.

Furthermore the used script tended to produce funny results in certain
cases. This has been fixed and as a result thereof a few more changes
were made in this second run.
2021-04-09 15:41:49 +02:00
Robert Adam
4e1129b6ed REFAC(client): Put qsslStringConversion to QtUtils
There was a function for processing QsslStrings in UserInformation.cpp
as well as ViewCert.cpp. These functions were completely identical.
Therefore there were name clashes that appeared when performing a unity
build.

Furthermore duplicating functionality in multiple places in never a good
idea. Thus this commit refactors the code so that both classes now use a
shared implementation in QtUtils.cpp.
2021-03-06 18:57:22 +01:00
Robert Adam
7205cdea60 REFAC: Use namespace for QtUtils 2021-03-06 18:57:22 +01:00
Robert Adam
59ae429972 MAINT: Update copyright notice to 2021
This was done by running scripts/updateLicenseHeaders.py and then
manually editing the LICENSE file.
2021-03-02 10:15:01 +01:00
Robert Adam
cc3c824499 FIX(client,ui): Crash by pressing Esc in nickname dialog
When having the dialog open that allows to set a custom nickname to
another client (UserLocalNicknameDialog) pressing Esc would crash
Mumble. This is due to the Esc key triggering the dialog's reject()
function in which the dialog's smart-pointer object is removed from a
global list and therefore goes out of scope.

This results in the dialog getting deleted, but since this is done in a
member function of the dialog, there is still code accessing the now
deleted object (in Qt's internals) and this is causing the segmentation
fault.

The fix is to use a custom deleter function for the dialog pointer that
instead of using delete on it, calls deleteLater() on it. Thus the
deletion of the object is left to Qt which can then do it at a point at
which it is done with it.

As this is something that could get useful in other locations as well,
the custom deleter function was outsourced into its own file.

Fixes #4666
2021-01-04 12:39:28 +01:00