pkg / sftp

SFTP support for the go.crypto/ssh package
BSD 2-Clause "Simplified" License
1.5k stars 380 forks source link

feat: add server opt Chroot() to change root path #486

Closed UnightSun closed 2 years ago

drakkan commented 2 years ago

Hi,

test cases don't pass. I didn't tested your implementation but after a quick look at the code I think chroot can be escaped via symlinks and this could or could not be desiderable. Additionally things like p = path.Join(svr.rootPath, p) assume UNIX paths.

I'm basically +0 here, chroot can be easily achieved, outside the library, using the request server implementation

UnightSun commented 2 years ago

You're right, I will check out request server, thank you for your time