openwrt/package/system
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
..
ca-certificates ca-certificates: Update to version 20230311 2023-05-28 19:51:52 +02:00
fstools fstools: add uci fstab section to conffiles for package block-mount 2022-08-12 22:46:51 +02:00
fwtool fwtool: update to latest Git head 2019-11-14 22:53:31 +01:00
iucode-tool treewide: Add extra CPE identifier 2023-09-27 22:33:09 +02:00
mtd mtd: fix imagetag compilation 2021-03-17 08:42:05 +01:00
openwrt-keyring openwrt-keyring: fix broken install step 2022-03-27 11:48:31 +02:00
opkg opkg: update to 2022-02-24 2022-07-17 15:15:11 +02:00
procd procd: make mDNS TXT record parsing more solid 2024-04-29 23:30:57 +02:00
refpolicy Revert "refpolicy: add variant that builds modular policy" 2020-11-22 15:20:35 +00:00
rpcd rpcd: update to latest Git HEAD 2022-12-19 15:33:27 +01:00
selinux-policy selinux-policy: update to version 1.1 2022-05-03 20:32:48 +01:00
ubox ubox: fix broken deferred start of logfile writer 2022-01-31 15:03:25 +00:00
ubus ubus: update to git HEAD 2022-06-05 11:38:12 +01:00
ucert ucert: update to latest git HEAD 2020-05-24 17:01:36 +02:00
uci uci: update to git HEAD 2021-10-22 23:51:51 +02:00
urandom-seed treewide: drop shebang from non-executable lib files 2021-01-29 14:29:41 +01:00
urngd urngd: update to version 2023-11-01 2023-11-19 14:58:44 +01:00
usign usign: update to latest git HEAD 2020-05-23 13:38:12 +02:00
zram-swap zram-swap: clean up the log messages 2021-06-27 14:49:14 -10:00