openbsd-ports/x11/kde/libs3/patches/patch-kioslave_ftp_ftp_cc

19 lines
629 B
Plaintext

$OpenBSD: patch-kioslave_ftp_ftp_cc,v 1.2 2005/03/29 21:18:36 espie Exp $
--- kioslave/ftp/ftp.cc.orig Wed Feb 23 12:57:14 2005
+++ kioslave/ftp/ftp.cc Wed Mar 23 09:35:08 2005
@@ -759,6 +759,14 @@ bool Ftp::ftpSendCmd( const QCString& cm
return false;
}
+ if ( cmd.find( '\r' ) != -1 || cmd.find( '\n' ) != -1)
+ {
+ kdWarning(7102) << "Invalid command received (contains CR or LF): "
+ << cmd.data() << endl;
+ error( ERR_UNSUPPORTED_ACTION, m_host );
+ return false;
+ }
+
// Don't print out the password...
bool isPassCmd = (cmd.left(4).lower() == "pass");
if ( !isPassCmd )