Skip to content

Commit

Permalink
Use correct response size limit for /info checks.
Browse files Browse the repository at this point in the history
Also raises it to 10 KiB.
  • Loading branch information
PJB3005 committed Apr 9, 2023
1 parent 8e37249 commit 6ece380
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion SS14.ServerHub/Controllers/ServerListController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ parsedAddress.Scheme is not (Ss14UriHelper.SchemeSs14 or Ss14UriHelper.SchemeSs1
return (UnprocessableEntity("Server name cannot be empty"), null, null);

// Fetch /info and just pass it through (no validation except making sure the JSON is well-formed).
var maxInfoSize = _options.Value.MaxStatusResponseSize;
var maxInfoSize = _options.Value.MaxInfoResponseSize;
byte[] infoResponse;
try
{
Expand Down
2 changes: 1 addition & 1 deletion SS14.ServerHub/HubOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ public sealed class HubOptions
/// <summary>
/// When fetching <code>/info</code> from advertised servers, maximum size of response bodies in kilobytes.
/// </summary>
public int MaxInfoResponseSize = 5;
public int MaxInfoResponseSize = 10;
}

0 comments on commit 6ece380

Please sign in to comment.