commit 4b92cb1: [Minor] Ignore trailing garbage
Vsevolod Stakhov
vsevolod at highsecure.ru
Mon Sep 9 10:35:07 UTC 2019
Author: Vsevolod Stakhov
Date: 2019-09-09 11:28:45 +0100
URL: https://github.com/rspamd/rspamd/commit/4b92cb19c48639d65f68f0292dd342bb1a38e62d (HEAD -> master)
[Minor] Ignore trailing garbage
---
src/libutil/http_connection.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/libutil/http_connection.c b/src/libutil/http_connection.c
index 31e8a3c1e..475a09c41 100644
--- a/src/libutil/http_connection.c
+++ b/src/libutil/http_connection.c
@@ -954,6 +954,14 @@ rspamd_http_event_handler (int fd, short what, gpointer ud)
err = g_error_new (HTTP_ERROR, 400,
"Encryption required");
}
+ else if (priv->parser.http_errno == HPE_CLOSED_CONNECTION) {
+ msg_err ("got garbage after end of the message, ignore it");
+
+ REF_RELEASE (pbuf);
+ rspamd_http_connection_unref (conn);
+
+ return;
+ }
else {
err = g_error_new (HTTP_ERROR, 500 + priv->parser.http_errno,
"HTTP parser error: %s",
More information about the Commits
mailing list