mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-05-27 00:55:16 -07:00
fix texthooker gate, overlay fallback, and control server byte limit
- gate --texthooker flag on both CLI useTexthooker arg and plugin texthookerEnabled - remove erroneous return that blocked legacy app startup fallback after control command failure - fix open-config-settings to only skipRender when window actually opened - track raw byte count for accurate 64KB limit in app control server
This commit is contained in:
@@ -44,12 +44,14 @@ export function startAppControlServer(options: AppControlServerOptions): AppCont
|
||||
|
||||
const server = net.createServer((socket) => {
|
||||
let buffer = '';
|
||||
let byteCount = 0;
|
||||
let handled = false;
|
||||
|
||||
socket.on('data', (chunk) => {
|
||||
if (handled) return;
|
||||
byteCount += chunk.length;
|
||||
buffer += chunk.toString('utf8');
|
||||
if (buffer.length > 65536) {
|
||||
if (byteCount > 65536) {
|
||||
handled = true;
|
||||
writeResponse(socket, { ok: false, error: 'App control request too large' });
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user