mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-30 08:33:19 +01:00
Regression test log file exploit
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
@@ -43,6 +43,11 @@ namespace Tgstation.Server.Tests
|
||||
{
|
||||
Name = "very_fake_path.log"
|
||||
}, cancellationToken), ErrorCode.IOError);
|
||||
|
||||
await Assert.ThrowsExceptionAsync<InsufficientPermissionsException>(() => client.GetLog(new LogFile
|
||||
{
|
||||
Name = "../out_of_bounds.file"
|
||||
}, cancellationToken));
|
||||
}
|
||||
|
||||
async Task TestRead(CancellationToken cancellationToken)
|
||||
|
||||
Reference in New Issue
Block a user