feat: Missing Reauthorization Requirement After AUTH Command Reset

This commit is contained in:
Ugo
2025-07-19 15:03:13 +01:00
parent 3b69b5e062
commit 622ac3651e
2 changed files with 3 additions and 1 deletions

View File

@ -300,7 +300,6 @@ static int processCommand(int processingElement, ftpDataType *ftpData)
IS_NOT_CMD(ftpData->clients[processingElement].theCommandReceived, "QUIT") && IS_NOT_CMD(ftpData->clients[processingElement].theCommandReceived, "QUIT") &&
IS_NOT_CMD(ftpData->clients[processingElement].theCommandReceived, "PBSZ") && IS_NOT_CMD(ftpData->clients[processingElement].theCommandReceived, "PBSZ") &&
IS_NOT_CMD(ftpData->clients[processingElement].theCommandReceived, "PROT") && IS_NOT_CMD(ftpData->clients[processingElement].theCommandReceived, "PROT") &&
IS_NOT_CMD(ftpData->clients[processingElement].theCommandReceived, "CCC") &&
IS_NOT_CMD(ftpData->clients[processingElement].theCommandReceived, "AUTH TLS"))) IS_NOT_CMD(ftpData->clients[processingElement].theCommandReceived, "AUTH TLS")))
{ {
toReturn = notLoggedInMessage(ftpData, processingElement); toReturn = notLoggedInMessage(ftpData, processingElement);

View File

@ -91,6 +91,7 @@ int parseCommandUser(ftpDataType * data, int socketId)
returnCode = socketPrintf(data, socketId, "s", "430 User is blocked.\r\n"); returnCode = socketPrintf(data, socketId, "s", "430 User is blocked.\r\n");
} }
data->clients[socketId].login.userLoggedIn = 0;
} }
else else
{ {
@ -323,6 +324,8 @@ int parseCommandAuth(ftpDataType *data, int socketId)
return FTP_COMMAND_PROCESSED_WRITE_ERROR; return FTP_COMMAND_PROCESSED_WRITE_ERROR;
} }
data->clients[socketId].login.userLoggedIn = 0;
returnCode = SSL_set_fd(data->clients[socketId].ssl, data->clients[socketId].socketDescriptor); returnCode = SSL_set_fd(data->clients[socketId].ssl, data->clients[socketId].socketDescriptor);
if (returnCode <= 0) if (returnCode <= 0)