]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Use the _last_ @ to find the end of the FTP USER name
authorAlex Rousskov <rousskov@measurement-factory.com>
Fri, 23 Aug 2013 02:08:53 +0000 (20:08 -0600)
committerAlex Rousskov <rousskov@measurement-factory.com>
Fri, 23 Aug 2013 02:08:53 +0000 (20:08 -0600)
(and the start of the FTP server host name).

src/client_side.cc

index 2466eb5a0871331c8ddd49fac6231d9c58afa5ce..68bc1f3ff2307c864e75eb9e6a39c9b84e4dc69e 100644 (file)
@@ -5433,7 +5433,7 @@ FtpHandleUserRequest(ConnStateData *connState, const String &cmd, String &params
         return false;
     }
 
-    const String::size_type eou = params.find('@');
+    const String::size_type eou = params.rfind('@');
     if (eou == String::npos || eou + 1 >= params.size()) {
         if (connState->ftp.uri.size() > 0)
             return true;