mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-06 00:52:01 +08:00
The sftp list/download/upload endpoints were not protected by authentication, only by the UUID4 session id. Anyone who learned the session id (it appears in URLs and logs) could list, download and upload files of the VM over the victim's active SSH/SFTP channel. Wrap all three endpoints with auth.Authenticate and record the owner of each sftp session at registration, so only the user who opened the session can use it. Co-authored-by: Qiu Jian <qiujian@yunionyun.com> Co-authored-by: Claude <noreply@anthropic.com>