]> 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:28:40 +0000 (15:28 -0600)
commitb471b40bc7973f9f0602143945d50c7b0f83afa2
treea9b92f49465db5cdfc64c0d56bb95e331c35671b
parent78b7ab11a42bd93f850964af30e5dbc3405c0579
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