myserver-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[myserver-commit] [3041] disallow to cd into files


From: Alexandru IANCU
Subject: [myserver-commit] [3041] disallow to cd into files
Date: Mon, 30 Mar 2009 19:42:10 +0000

Revision: 3041
          http://svn.sv.gnu.org/viewvc/?view=rev&root=myserver&revision=3041
Author:   andu
Date:     2009-03-30 19:42:09 +0000 (Mon, 30 Mar 2009)
Log Message:
-----------
disallow to cd into files

Modified Paths:
--------------
    trunk/myserver/src/protocol/ftp/ftp.cpp

Modified: trunk/myserver/src/protocol/ftp/ftp.cpp
===================================================================
--- trunk/myserver/src/protocol/ftp/ftp.cpp     2009-03-30 19:04:13 UTC (rev 
3040)
+++ trunk/myserver/src/protocol/ftp/ftp.cpp     2009-03-30 19:42:09 UTC (rev 
3041)
@@ -2101,6 +2101,11 @@
   std::string sLocalPath;
   if ( !GetLocalPath(sPath, sLocalPath) )
     return;
+  if ( !FilesUtility::isDirectory(sLocalPath) )
+    {
+      ftp_reply(550);
+      return;
+    }
   FtpUserData *pFtpUserData = static_cast<FtpUserData 
*>(td.pConnection->protocolBuffer);
   assert(pFtpUserData != NULL);
   pFtpUserData->m_cwd = sLocalPath;





reply via email to

[Prev in Thread] Current Thread [Next in Thread]