]> 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)
committerFriendly Automation <jenkins2@gerrit.asterisk.org>
Wed, 23 Feb 2022 21:23:59 +0000 (15:23 -0600)
commit26141981c542cfbb889f884aef5ee91150e746e1
tree4e0732ee450f041f20b7f8495856993bd700f7d1
parente2423c6f4935477a3e06bad512c6d496783be6e2
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