Merge in SNORT/snort3 from ~ABHPAL/snort3:ftp_no_encrypt to master
Squashed commit of the following:
commit
4ef21c0f3c7b90b57c42d6075add9f80029e1ae4
Author: Abhijit Pal(abhpal) <abhpal@cisco.com>
Date: Fri Jun 10 13:59:41 2022 +0530
ftp_telnet: handle all space characters as a seperator between FTP request command and arguments
*
*/
#define NUL 0x00
-#define FF 0x0c
#define CR 0x0d
#define LF 0x0a
#define SP 0x20
req->cmd_begin = (const char*)read_ptr;
while ((read_ptr < end) &&
- (*read_ptr != SP) &&
- (*read_ptr != FF) &&
- (*read_ptr != CR) &&
+ (!isspace(*read_ptr)) &&
(*read_ptr != LF) && /* Check for LF when there wasn't a CR,
* protocol violation, but accepted by
* some servers. */
if (read_ptr < end)
{
- if ((*read_ptr == SP) || (*read_ptr == FF))
+ if (isspace(*read_ptr))
{
space = 1;
}