From 622ac3651ee8a1b12ddbe7650f7151bdbd05e67a Mon Sep 17 00:00:00 2001 From: Ugo Date: Sat, 19 Jul 2025 15:03:13 +0100 Subject: [PATCH] feat: Missing Reauthorization Requirement After AUTH Command Reset --- controlChannel/controlChannel.c | 1 - ftpCommandElaborate.c | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/controlChannel/controlChannel.c b/controlChannel/controlChannel.c index dbac07d..8f696d9 100644 --- a/controlChannel/controlChannel.c +++ b/controlChannel/controlChannel.c @@ -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, "PBSZ") && 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"))) { toReturn = notLoggedInMessage(ftpData, processingElement); diff --git a/ftpCommandElaborate.c b/ftpCommandElaborate.c index b070b8f..ec83728 100755 --- a/ftpCommandElaborate.c +++ b/ftpCommandElaborate.c @@ -91,6 +91,7 @@ int parseCommandUser(ftpDataType * data, int socketId) returnCode = socketPrintf(data, socketId, "s", "430 User is blocked.\r\n"); } + data->clients[socketId].login.userLoggedIn = 0; } else { @@ -323,6 +324,8 @@ int parseCommandAuth(ftpDataType *data, int socketId) return FTP_COMMAND_PROCESSED_WRITE_ERROR; } + data->clients[socketId].login.userLoggedIn = 0; + returnCode = SSL_set_fd(data->clients[socketId].ssl, data->clients[socketId].socketDescriptor); if (returnCode <= 0)