1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-07-07 07:43:13 +02:00

Improve "non-SSL client on SSL port" detection.

This commit is contained in:
Bram Matthys
2017-11-25 16:01:56 +01:00
parent 668e1241b0
commit 2a040b40a5
+1 -1
View File
@@ -626,7 +626,7 @@ int ircd_SSL_accept(aClient *acptr, int fd) {
(void)send(fd, buf, strlen(buf), 0);
return fatal_ssl_error(SSL_ERROR_SSL, SAFE_SSL_ACCEPT, ERRNO, acptr);
}
if ((n >= 4) && (!strncmp(buf, "USER", 4) || !strncmp(buf, "NICK", 4) || !strncmp(buf, "PASS", 4)))
if ((n >= 4) && (!strncmp(buf, "USER", 4) || !strncmp(buf, "NICK", 4) || !strncmp(buf, "PASS", 4) || !strncmp(buf, "CAP ", 4)))
{
char buf[512];
snprintf(buf, sizeof(buf),