Skip to content
Snippets Groups Projects
Commit cb0a3bf5 authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

Limit sends in terminal and web servers to 8k as well.

It fixed an issue in js_socket.c, no reason to expect better
behaviour with TLS.  This may fix SZ YModem-G transfers on
cvs.synchro.net...
parent 81e52c9c
Branches
Tags
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #1537 passed
......@@ -2443,6 +2443,13 @@ void output_thread(void* arg)
i=buftop-bufbot; // Pretend we sent it all
}
else {
/*
* Limit as per js_socket.c.
* Sure, this is TLS, not SSH, but we see weird stuff here in sz file transfers.
*/
size_t sendbytes = buftop-bufbot;
if (sendbytes > 0x2000)
sendbytes = 0x2000;
if(cryptStatusError((err=cryptPushData(sbbs->ssh_session, (char*)buf+bufbot, buftop-bufbot, &i)))) {
/* Handle the SSH error here... */
GCESSTR(err, node, LOG_WARNING, sbbs->ssh_session, "pushing data");
......
......@@ -645,7 +645,14 @@ static int sess_sendbuf(http_session_t *session, const char *buf, size_t len, BO
switch(sel) {
case 1:
if (session->is_tls) {
status = cryptPushData(session->tls_sess, buf+sent, len-sent, &tls_sent);
/*
* Limit as per js_socket.c.
* Sure, this is TLS, not SSH, but we see weird stuff here in sz file transfers.
*/
size_t sendbytes = len-sent;
if (sendbytes > 0x2000)
sendbytes = 0x2000;
status = cryptPushData(session->tls_sess, buf+sent, sendbytes, &tls_sent);
GCES(status, session, "pushing data");
if (status == CRYPT_ERROR_TIMEOUT) {
tls_sent = 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment