]> git.ipfire.org Git - thirdparty/asterisk.git/commit
func_db: Add validity check for key names when writing.
authorNaveen Albert <asterisk@phreaknet.org>
Fri, 18 Feb 2022 12:09:47 +0000 (12:09 +0000)
committerKevin Harwell <kharwell@digium.com>
Wed, 23 Feb 2022 21:19:59 +0000 (15:19 -0600)
commitb1765c93e40e561b074cb3f1efa4327e206a1cad
tree2e259ba0830bbe8ce4c8db07456319fb56868493
parent4722c8b70a60219d0b1e5fb43ea954d9d4760a63
func_db: Add validity check for key names when writing.

Adds a simple sanity check for key names when users are
writing data to AstDB. This captures four cases indicating
malformed keynames that generally result in bad data going
into the DB that the user didn't intend: an empty key name,
a key name beginning or ending with a slash, and a key name
containing two slashes in a row. Generally, this is the
result of a variable being used in the key name being empty.

If a malformed key name is detected, a warning is emitted
to indicate the bug in the dialplan.

ASTERISK-29925 #close

Change-Id: Ifc08a9fe532a519b1b80caca1aafed7611d573bf
funcs/func_db.c