From 5bd8253c7c482272b9a4ea1f26c73e8b5c0c0d7c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Deuc=D0=B5?= <shurd@sasktel.net>
Date: Fri, 9 Feb 2024 12:05:45 -0500
Subject: [PATCH] Temporary workaround for TLS issue.

It appears that if the timing is "just wrong", a large POST can
cause TLS to fail.  This has shown up as an inability to edit
pages in the wiki.

This is not a fix however, but simple a workaround until this is
root-caused.
---
 src/sbbs3/websrvr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/sbbs3/websrvr.c b/src/sbbs3/websrvr.c
index 5af38aecf7..dac03e3bca 100644
--- a/src/sbbs3/websrvr.c
+++ b/src/sbbs3/websrvr.c
@@ -6659,7 +6659,7 @@ void http_session_thread(void* arg)
 			thread_down();
 			return;
 		}
-		HANDLE_CRYPT_CALL(cryptSetAttribute(session.tls_sess, CRYPT_OPTION_NET_READTIMEOUT, 0), &session, "setting read timeout");
+		HANDLE_CRYPT_CALL(cryptSetAttribute(session.tls_sess, CRYPT_OPTION_NET_READTIMEOUT, 1), &session, "setting read timeout");
 	}
 
 	/* Start up the output buffer */
-- 
GitLab