Skip to content

Commit 9bc087f

Browse files
committed
Fix architectural and functional issues in PocketMC
- Deleted empty scaffolding UnitTest1.cs files in test projects to clean up tests - Ensured RCON 'save-all' during backups fully awaits via 'save-all flush' and explicitly verified return messages to avoid world corruption - Secured RemoteDashboardHost by adding CORS and an anti-CSRF check requiring an X-Requested-With header on POST requests - Enforced a hard memory cap of 5000 lines on console output history to prevent OOM - Optimized ResourceMonitorService polling to gracefully back off to 10s intervals when the application window is minimized - Added X-Requested-With header to integration tests to bypass Anti-CSRF successfully
1 parent 274dac6 commit 9bc087f

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

PocketMC.Desktop.Tests/RemoteControlApiIntegrationTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ public RemoteControlApiIntegrationTests()
6565
{
6666
BaseAddress = new Uri($"http://127.0.0.1:{_port}")
6767
};
68+
_client.DefaultRequestHeaders.Add("X-Requested-With", "XMLHttpRequest");
6869
}
6970

7071
public async Task InitializeAsync()

0 commit comments

Comments
 (0)