openwrt/package
Christian Marangi ebb3faf31f
procd: make mDNS TXT record parsing more solid
mDNS broadcast can't accept empty TXT record and would fail
registration.

Current procd_add_mdns_service checks only if the first passed arg is
empty but don't make any verification on the other args permittins
insertion of empty values in TXT record.

Example:

	procd_add_mdns "blah" \
				"tcp" "50" \
				"1" \
				"" \
				"3"

Produce:

{ "blah_50": { "service": "_blah._tcp.local", "port": 50, "txt": [ "1", "", "3" ] } }

The middle empty TXT record should never be included as it's empty.

This can happen with scripts that make fragile parsing and include
variables even if they are empty.

Prevent this and make the TXT record more solid by checking every
provided TXT record and include only the non-empty ones.

The fixed JSON is the following:

{ "blah_50": { "service": "_blah._tcp.local", "port": 50, "txt": [ "1", "3" ] } }

Fixes: b0d9dcf84d ("procd: update to latest git HEAD")
Reported-by: Paul Donald <newtwen@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15331
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit 4b04304713)
2024-04-29 23:30:57 +02:00
..
base-files OpenWrt v22.03.6: revert to branch defaults 2023-12-03 20:02:26 +01:00
boot ramips: add support for SNR-CPE-W4N-MT router 2023-11-21 00:43:17 +01:00
devel gdb: Do not link against xxhash 2023-01-02 18:51:17 +01:00
firmware wireless-regdb: update to 2024.01.23 2024-04-21 19:25:07 +02:00
kernel mac80211: Update to 5.15.153-1 2024-04-21 17:29:57 +02:00
libs mbedtls: security bump to version 2.28.7 2024-01-29 09:45:00 +00:00
network hostapd: backport fix for CVE-2023-52160 2024-02-22 21:50:16 +01:00
system procd: make mDNS TXT record parsing more solid 2024-04-29 23:30:57 +02:00
utils jsonfilter: update to Git HEAD (2024-01-23) 2024-01-23 09:10:03 +01:00
Makefile build: generate index.json 2023-05-10 00:07:15 +02:00