From: Alex Rousskov Date: Fri, 23 Aug 2013 02:08:53 +0000 (-0600) Subject: Use the _last_ @ to find the end of the FTP USER name X-Git-Tag: SQUID_3_5_0_1~117^2~61 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e459a99d40b8b56035dc1ed26410823212cd1ed6;p=thirdparty%2Fsquid.git Use the _last_ @ to find the end of the FTP USER name (and the start of the FTP server host name). --- diff --git a/src/client_side.cc b/src/client_side.cc index 2466eb5a08..68bc1f3ff2 100644 --- a/src/client_side.cc +++ b/src/client_side.cc @@ -5433,7 +5433,7 @@ FtpHandleUserRequest(ConnStateData *connState, const String &cmd, String ¶ms 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;