openwrt/package
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
..
base-files base-files: Add new functions for ath11k caldata 2024-04-23 22:35:57 +02:00
boot arm-trusted-firmware-mvebu: refresh cryptopp hash 2024-04-29 13:02:23 +02:00
devel perf: fix build on PowerPC 2024-04-26 15:19:48 +03:00
firmware ipq-wifi: correct PKG_MIRROR_HASH 2024-04-27 23:29:48 +02:00
kernel modules: Add kernel module for MV88E6xxx DSA switch 2024-04-24 23:15:58 +02:00
libs mbedtls: Remove Kconfig options removed from mbedtls 3.6.0 2024-04-29 01:32:36 +02:00
network uqmi: set dangling-pointer as error 2024-04-28 23:51:19 +02:00
system procd: make mDNS TXT record parsing more solid 2024-04-29 23:24:58 +02:00
utils libaudit: update to 3.1.4, join with daemon and utils, rename 2024-04-29 00:53:43 +02:00
Makefile build: do not depend on $(STAGING_DIR)/.prepared when in SDK 2024-03-04 23:45:15 +01:00