mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
fix file tranfser access control.
This commit is contained in:
parent
db87229f16
commit
04a0ce17de
@ -8,6 +8,10 @@ import (
|
||||
)
|
||||
|
||||
func (h *MessageHandler) FileTransferRefresh(session types.Session) error {
|
||||
if !h.state.FileTransferEnabled() {
|
||||
return nil
|
||||
}
|
||||
|
||||
fileTransferPath := h.state.FileTransferPath("") // root
|
||||
|
||||
// allow users only if file transfer is not locked
|
||||
@ -16,6 +20,7 @@ func (h *MessageHandler) FileTransferRefresh(session types.Session) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// TODO: keep list of files in memory and update it on file changes
|
||||
files, err := utils.ListFiles(fileTransferPath)
|
||||
if err != nil {
|
||||
return err
|
||||
|
Loading…
Reference in New Issue
Block a user