mirror of
https://github.com/zoriya/flood.git
synced 2026-06-06 12:02:13 +00:00
moveTorrents: get sourceBasePath and baseFileName in server
With these two properties, it is hard for third party to utilize API to move torrents without retrieving torrent details first. Plus, client-supplied paths and filenames can lead to arbitrary file system access which is a security issue. In conclusion, it doesn't make sense to let client to provide these two properties.
This commit is contained in:
@@ -23,17 +23,12 @@ export interface DeleteTorrentsOptions {
|
||||
deleteData?: boolean;
|
||||
}
|
||||
|
||||
// TODO: filenames and sourcePaths should not be supplied by the client.
|
||||
// POST /api/client/torrents/move
|
||||
export interface MoveTorrentsOptions {
|
||||
// Hashes of torrents to be moved
|
||||
hashes: Array<TorrentProperties['hash']>;
|
||||
// Path of destination
|
||||
destination: string;
|
||||
// Filenames of data of torrents
|
||||
filenames: Array<string>;
|
||||
// Source paths of data of torrents
|
||||
sourcePaths: Array<string>;
|
||||
// Whether to move data of torrents
|
||||
moveFiles: boolean;
|
||||
// Whether destination is the base path
|
||||
|
||||
Reference in New Issue
Block a user