🐞 fix(文件传输): 过滤ALLO命令

This commit is contained in:
huheng@kylinos.cn 2023-06-09 16:39:12 +08:00
parent 0a82db07ac
commit e915135bef
1 changed files with 5 additions and 1 deletions

View File

@ -955,7 +955,7 @@ bool QFtpPI::processReply()
int replyCodeInt = 100 * replyCode[0] + 10 * replyCode[1] + replyCode[2];
if (replyCodeInt == 225 && currentCmd.startsWith(QLatin1String("ALLO"))) {
if (replyCodeInt == 225 && currentCmd.startsWith(QLatin1String("ALLO "))) {
Q_EMIT error(QFtp::RejectTran, QFtp::tr("Insufficient storage space on the other party's device"));
return false;
}
@ -995,6 +995,10 @@ bool QFtpPI::processReply()
// reply codes not starting with 1 or 2 are not handled.
return true;
case Waiting:
if (currentCmd.startsWith(QLatin1String("ALLO "))) {
state = Success;
break;
}
if (static_cast<signed char>(replyCode[0]) < 0 || replyCode[0] > 5)
state = Failure;
else