mirror of
https://github.com/ONLYOFFICE/server.git
synced 2026-04-07 14:04:35 +08:00
[bug] Fix Path Traversal vulnerability via savefile param
This commit is contained in:
@ -1125,6 +1125,7 @@ exports.saveFile = function(req, res) {
|
||||
}
|
||||
cmd.setStatusInfo(constants.NO_ERROR);
|
||||
yield* addRandomKeyTaskCmd(cmd);
|
||||
cmd.setOutputPath(constants.OUTPUT_NAME + pathModule.extname(cmd.getOutputPath()));
|
||||
yield storage.putObject(cmd.getSaveKey() + '/' + cmd.getOutputPath(), req.body, req.body.length);
|
||||
let replyStr = yield* commandSfcCallback(cmd, false, true);
|
||||
if (replyStr) {
|
||||
|
||||
Reference in New Issue
Block a user