openwrt/package/system
Christian Marangi 4b04304713
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>
2024-04-29 23:24:58 +02:00
..
apk apk: add package 2024-04-29 11:36:03 +02:00
ca-certificates ca-certificates: add missing license information 2024-03-21 21:44:53 +01:00
fstools treewide: update PKG_MIRROR_HASH to zst 2024-04-06 11:24:18 +02:00
fwtool treewide: update PKG_MIRROR_HASH to zst 2024-04-06 11:24:18 +02:00
gpio-cdev/nu801 nu801: update PKG_MIRROR_HASH to zst 2024-04-07 11:49:53 +02:00
iucode-tool treewide: Add extra CPE identifier 2023-09-25 23:06:33 +02:00
mtd ipq807x: add support for Linksys MX4200 V1 and V2 2024-01-06 16:13:23 +01:00
openwrt-keyring treewide: update PKG_MIRROR_HASH to zst 2024-04-06 11:24:18 +02:00
opkg treewide: update PKG_MIRROR_HASH to zst 2024-04-06 11:24:18 +02:00
procd procd: make mDNS TXT record parsing more solid 2024-04-29 23:24:58 +02:00
refpolicy
rpcd treewide: update PKG_MIRROR_HASH to zst 2024-04-06 11:24:18 +02:00
selinux-policy treewide: update PKG_MIRROR_HASH to zst 2024-04-06 11:24:18 +02:00
ubox ubox: update to Git HEAD (2024-04-26) 2024-04-27 13:34:13 +02:00
ubus treewide: update PKG_MIRROR_HASH to zst 2024-04-06 11:24:18 +02:00
ucert treewide: update PKG_MIRROR_HASH to zst 2024-04-06 11:24:18 +02:00
uci treewide: update PKG_MIRROR_HASH to zst 2024-04-06 11:24:18 +02:00
urandom-seed treewide: disable QUILT refresh for unsupported packages 2023-10-20 16:13:13 +02:00
urngd treewide: update PKG_MIRROR_HASH to zst 2024-04-06 11:24:18 +02:00
usign treewide: update PKG_MIRROR_HASH to zst 2024-04-06 11:24:18 +02:00
zram-swap