Merge remote-tracking branch 'remotes/origin/1.4.12' into 1.4.10-openssl

This commit is contained in:
WolverinDEV 2020-04-16 13:38:16 +02:00
commit 9705f84bc0
19 changed files with 40 additions and 17 deletions

View File

@ -78,11 +78,16 @@ void manager::loadProviders(const std::string& path) {
} }
deque<fs::path> paths; deque<fs::path> paths;
for(const auto& entry : fs::directory_iterator(dir)){ error_code error_code{};
for(const auto& entry : fs::directory_iterator(dir, error_code)){
if(!entry.path().has_extension()) continue; if(!entry.path().has_extension()) continue;
if(entry.path().extension().string() == ".so") if(entry.path().extension().string() == ".so")
paths.push_back(entry.path()); paths.push_back(entry.path());
} }
if(error_code) {
log::log(log::err, "Failed to scan the target directory (" + dir.string() + "): " + error_code.message());
return;
}
std::sort(paths.begin(), paths.end(), [](const fs::path& a, const fs::path& b){ return a.filename().string() < b.filename().string(); }); std::sort(paths.begin(), paths.end(), [](const fs::path& a, const fs::path& b){ return a.filename().string() < b.filename().string(); });
int index = 0; int index = 0;

@ -1 +1 @@
Subproject commit df91da75149777e774da60e948439ef426a690dc Subproject commit e7befd4fc9c96b966b459ea5ad8530dc8fe9345b

View File

@ -1 +0,0 @@
../repro/env/geoloc/

View File

@ -1 +0,0 @@
../../music/bin/providers/

View File

@ -1 +0,0 @@
../repro/env/resources/

View File

@ -6,6 +6,31 @@ if [[ -z "${BUILD_PATH}" ]]; then
exit 1 exit 1
fi fi
rm -r env
mkdir env && de env
[[ $? -ne 0 ]] && {
echo "Failed to create the env"
exit 1
}
cp -r ../../../git-teaspeak/default_files/{certs,commanddocs,geoloc,resources,,*.sh} .
[[ $? -ne 0 ]] && {
echo "Failed to copy env"
exit 1
}
cp -r ../../../music/providers .
[[ $? -ne 0 ]] && {
echo "Failed to copy providers"
exit 1
}
#
cp ../../environment/TeaSpeakServer .
[[ $? -ne 0 ]] && {
echo "Failed to copy server"
exit 1
}
cd ..
./generate_version.sh "${BUILD_PATH}" || { ./generate_version.sh "${BUILD_PATH}" || {
echo "Failed to generate version! ($?)" echo "Failed to generate version! ($?)"
exit 1 exit 1

View File

@ -1 +0,0 @@
../../environment/TeaSpeakServer

View File

@ -1 +0,0 @@
../../../git-teaspeak/default_files/certs/

View File

@ -1 +0,0 @@
../../../git-teaspeak/default_files/commanddocs/

View File

@ -1 +0,0 @@
../../../git-teaspeak/default_files/geoloc/

View File

@ -1 +0,0 @@
../../../git-teaspeak/default_files/install_music.sh

View File

@ -1 +0,0 @@
../../../music/bin/providers/

View File

@ -1 +0,0 @@
../../../git-teaspeak/default_files/resources/

View File

@ -1 +0,0 @@
../../../git-teaspeak/default_files/tealoop.sh

View File

@ -1 +0,0 @@
../../../git-teaspeak/default_files/teastart.sh

View File

@ -1 +0,0 @@
../../../git-teaspeak/default_files/teastart_autorestart.sh

View File

@ -1 +0,0 @@
../../../git-teaspeak/default_files/teastart_minimal.sh

View File

@ -369,6 +369,13 @@ bool VoiceClientConnection::next_reassembled_command(unique_lock<std::recursive_
std::string error{}; std::string error{};
auto decompressed_size = compression::qlz_decompressed_size(payload.data_ptr(), payload.length()); auto decompressed_size = compression::qlz_decompressed_size(payload.data_ptr(), payload.length());
if(decompressed_size == 0) {
logTrace(this->client->getServerId(), "{} Failed to calculate decompressed size for received command. Dropping packet.", CLIENT_STR_LOG_PREFIX_(this->client));
return false;
} else if(decompressed_size > 20 * 1024 * 1024) { /* max 20MB */
logTrace(this->client->getServerId(), "{} Command packet has a too large compressed size. Dropping packet.", CLIENT_STR_LOG_PREFIX_(this->client));
return false;
}
auto buffer = buffer::allocate_buffer(decompressed_size); auto buffer = buffer::allocate_buffer(decompressed_size);
if(!compression::qlz_decompress_payload(payload.data_ptr(), buffer.data_ptr(), &decompressed_size)) { if(!compression::qlz_decompress_payload(payload.data_ptr(), buffer.data_ptr(), &decompressed_size)) {
logTrace(this->client->getServerId(), "{} Failed to decompress received command. Dropping packet.", CLIENT_STR_LOG_PREFIX_(this->client)); logTrace(this->client->getServerId(), "{} Failed to decompress received command. Dropping packet.", CLIENT_STR_LOG_PREFIX_(this->client));

2
shared

@ -1 +1 @@
Subproject commit 707736d896f46489133e6da6b7543238274c37e6 Subproject commit 16c2272fe4b479c55e6db6642d039a42b0774325