Skip to content

Commit

Permalink
fix for server join-request flood attack
Browse files Browse the repository at this point in the history
  • Loading branch information
efroemling committed Oct 27, 2023
1 parent f31087d commit 03675a2
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 26 deletions.
40 changes: 20 additions & 20 deletions .efrocachemap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
### 1.7.28 (build 21524, api 8, 2023-10-27)
### 1.7.28 (build 21525, api 8, 2023-10-27)

- Massively cleaned up code related to rendering and window systems (OpenGL,
SDL, etc). This code had been growing into a nasty tangle for 15 years
Expand Down Expand Up @@ -174,6 +174,8 @@
leave to prevent game exploits. Note this is different than the existing
system that prevents joining a *party* for 10 seconds; this covers people
who never leave the party (Thanks EraOSBeta!).
- Fixes an issue where servers could be crashed by flooding them with join
requests (Thanks for the heads-up Era!).

### 1.7.27 (build 21282, api 8, 2023-08-30)

Expand Down
2 changes: 1 addition & 1 deletion src/assets/ba_data/python/baenv.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@

# Build number and version of the ballistica binary we expect to be
# using.
TARGET_BALLISTICA_BUILD = 21524
TARGET_BALLISTICA_BUILD = 21525
TARGET_BALLISTICA_VERSION = '1.7.28'


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,14 @@ void ClientInputDeviceDelegate::AttachToLocalPlayer(Player* player) {
}

// We also need to send an old-style message as a fallback.
//
// FIXME: Can remove this once backwards-compat-protocol is > 29.
{
//
// UPDATE: Only send this if player id fits. This could cause problems
// for older clients in very rare cases, but the only alternative is
// to not support those clients. I doubt there are many such old
// clients out there anyway.
if (player->id() < 256) {
std::vector<uint8_t> data(3);
data[0] = BA_MESSAGE_ATTACH_REMOTE_PLAYER;
data[1] = static_cast_check_fit<uint8_t>(remote_device_id_);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ void SceneV1InputDeviceDelegate::RequestPlayer() {
return;
}

// If we have a local host-session, ask it for a player.. otherwise if we have
// a client-session, ask it for a player.
// If we have a local host-session, ask it for a player.. otherwise if we
// have a client-session, ask it for a player.
assert(g_base->logic);
if (auto* hs = dynamic_cast<HostSession*>(appmode->GetForegroundSession())) {
{
Expand Down
2 changes: 1 addition & 1 deletion src/ballistica/shared/ballistica.cc
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ auto main(int argc, char** argv) -> int {
namespace ballistica {

// These are set automatically via script; don't modify them here.
const int kEngineBuildNumber = 21524;
const int kEngineBuildNumber = 21525;
const char* kEngineVersion = "1.7.28";
const int kEngineApiVersion = 8;

Expand Down

0 comments on commit 03675a2

Please sign in to comment.