[OpenSIPS-Devel] [OpenSIPS/opensips] 13a518: cachedb_redis: Allow quoting strings in raw queries
Liviu Chircu
noreply at github.com
Wed Apr 20 16:27:02 UTC 2022
Branch: refs/heads/3.1
Home: https://github.com/OpenSIPS/opensips
Commit: 13a5185bde013e8f377c737ab81da22552d13b1d
https://github.com/OpenSIPS/opensips/commit/13a5185bde013e8f377c737ab81da22552d13b1d
Author: Liviu Chircu <liviu at opensips.org>
Date: 2022-04-20 (Wed, 20 Apr 2022)
Changed paths:
M modules/cachedb_redis/cachedb_redis.c
M modules/cachedb_redis/cachedb_redis_dbase.c
M modules/cachedb_redis/cachedb_redis_dbase.h
M modules/cachedb_redis/doc/cachedb_redis_admin.xml
Log Message:
-----------
cachedb_redis: Allow quoting strings in raw queries
In case the Redis raw query string arguments include whitespace (' ',
\t, \r, \n), script developers can now enclose them in single (') or
double quotes ("), and OpenSIPS will pass the correct string to Redis.
For example:
cache_raw_query("redis", "SET foo \"bar baz\"", "$avp(result)");
or:
cache_raw_query("redis", "SET foo 'bar baz'", "$avp(result)");
... are now possible and equivalent. Both of these will set the
"bar baz" value, without the quotes.
NEW module parameter in order to maintain backwards-compatibility with
previous code (default: 0):
modparam("cachedb_redis", "enable_query_arg_quoting", 1)
Fixes #2036
(cherry picked from commit 6ecac89e5418b9a192519d1ed3cde000695079d1)
More information about the Devel
mailing list