From 227d18e7e7b71dc64c4f457ed38a4af71947aa08 Mon Sep 17 00:00:00 2001 From: timiimit Date: Fri, 3 Feb 2023 13:56:21 +0100 Subject: [PATCH] Limit game server db retrieval --- UT4MasterServer.Services/Scoped/MatchmakingService.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/UT4MasterServer.Services/Scoped/MatchmakingService.cs b/UT4MasterServer.Services/Scoped/MatchmakingService.cs index aca222ed..8483cb51 100644 --- a/UT4MasterServer.Services/Scoped/MatchmakingService.cs +++ b/UT4MasterServer.Services/Scoped/MatchmakingService.cs @@ -139,6 +139,11 @@ public async Task> ListAsync(GameServerFilterRequest inputFilte } } + // Limit number of results. if request retrieves more results, + // then caller should make filter more strict. + if (inputFilter.MaxResults > 100) + inputFilter.MaxResults = 100; + var options = new FindOptions() { Limit = inputFilter.MaxResults,