Skip to content

Commit

Permalink
Fixed a bug when RETR command was send
Browse files Browse the repository at this point in the history
Fixed a bug in the RETR command. If the working directory wasn't the root (sandbox) directory, the RETR command could fail or send a wrong file.
  • Loading branch information
dododedodonl committed Sep 25, 2012
1 parent 357f361 commit 1f3d9a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ftpd.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -561,7 +561,7 @@ function createServer(host, sandbox) {
whenDataWritable( function(pasvconn) { whenDataWritable( function(pasvconn) {
pasvconn.setEncoding(socket.mode); pasvconn.setEncoding(socket.mode);


var filename = PathModule.resolve('/', commandArg); var filename = PathModule.resolve(socket.fs.cwd(), commandArg);
if(filename != socket.filename) if(filename != socket.filename)
{ {
socket.totsize = 0; socket.totsize = 0;
Expand Down

0 comments on commit 1f3d9a6

Please sign in to comment.