]> 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:16:59 +0000 (15:16 -0600)
commit257590b4e2d16aba6e28d4a18c2e006e1bb4b4db
treef6595e7713df1f93ef151b9c701785d9b2654469
parente85ee05e9d61010c58e9ec0e287bd445ad192acf
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