Fix faulty handling of named pipes; closes pterodactyl/panel#4059

This commit is contained in:
DaneEveritt
2022-05-07 15:53:08 -04:00
parent 6c98a955e3
commit 1d197714df
4 changed files with 35 additions and 102 deletions

View File

@@ -119,16 +119,6 @@ func TestFilesystem_Blocks_Symlinks(t *testing.T) {
panic(err)
}
g.Describe("Readfile", func() {
g.It("cannot read a file symlinked outside the root", func() {
b := bytes.Buffer{}
err := fs.Readfile("symlinked.txt", &b)
g.Assert(err).IsNotNil()
g.Assert(IsErrorCode(err, ErrCodePathResolution)).IsTrue()
})
})
g.Describe("Writefile", func() {
g.It("cannot write to a file symlinked outside the root", func() {
r := bytes.NewReader([]byte("testing"))