fix SECURITY bug with local address not being used

This commit is contained in:
numzero 2026-05-03 00:19:19 +03:00
parent 866ecc9302
commit e6f049da4b

View File

@ -31,7 +31,7 @@ handle() {
response_pipe="$tmpdir/response-$connection_id.pipe" response_pipe="$tmpdir/response-$connection_id.pipe"
event_pipe="$tmpdir/event-$connection_id.pipe" event_pipe="$tmpdir/event-$connection_id.pipe"
mkfifo -m 0600 "$response_pipe" "$event_pipe" mkfifo -m 0600 "$response_pipe" "$event_pipe"
gnetcat -c -l "$ADDR" -p "$PORT" < "$response_pipe" | sed -E -u 's/\r$//' | ( gnetcat --listen --source "$ADDR" --local-port "$PORT" --close < "$response_pipe" | sed -E -u 's/\r$//' | (
read method url version || { read method url version || {
echo "Connection broken" > "$event_pipe" echo "Connection broken" > "$event_pipe"
exit exit