Changeset

11023:a59b37b03eca

mod_net_multiplex: Read no more than the max buffer size setting Otherwise the '*a' read mode applies, which under certain circumstances can read infinite amounts of data into memory.
author Kim Alvefur <zash@zash.se>
date Sun, 02 Aug 2020 00:22:57 +0200
parents 11022:3e5bc34be734
children 11024:1c7602c70d1f
files plugins/mod_net_multiplex.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_net_multiplex.lua	Sat Aug 01 18:41:30 2020 +0200
+++ b/plugins/mod_net_multiplex.lua	Sun Aug 02 00:22:57 2020 +0200
@@ -41,7 +41,7 @@
 
 local buffers = {};
 
-local listener = { default_mode = "*a" };
+local listener = { default_mode = max_buffer_len };
 
 function listener.onconnect(conn)
 	local sock = conn:socket();