]> Sergey Matveev's repositories - btrtrc.git/commit
Sanitize metainfo file paths for file-based storage
authorMatt Joiner <anacrolix@gmail.com>
Thu, 15 Oct 2020 04:45:08 +0000 (15:45 +1100)
committerMatt Joiner <anacrolix@gmail.com>
Thu, 15 Oct 2020 04:45:08 +0000 (15:45 +1100)
commit89235e180fa146811cbf3d74ce716e36e3215f66
treed34b8b112baabe4fa3baf7bdd05de6ccba3182cc
parent635ec27fb3666ea2072997666b4d356dde25f7af
Sanitize metainfo file paths for file-based storage

Fixes exploit where specially crafted infos can cause the client to write files to arbitrary locations on local storage when using file-based storages like mmap and file.
storage/file.go
storage/file_misc.go
storage/file_misc_test.go
storage/file_piece.go
storage/mmap.go
storage/safe-path.go [new file with mode: 0644]
storage/safe-path_test.go [new file with mode: 0644]