diff options
Diffstat (limited to 'src/libserver')
-rw-r--r-- | src/libserver/fuzzy_backend_redis.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/libserver/fuzzy_backend_redis.c b/src/libserver/fuzzy_backend_redis.c index 9a6648d4d..f8bec8882 100644 --- a/src/libserver/fuzzy_backend_redis.c +++ b/src/libserver/fuzzy_backend_redis.c @@ -195,7 +195,12 @@ rspamd_fuzzy_backend_redis_try_ucl (struct rspamd_fuzzy_backend_redis *backend, elt = ucl_object_lookup_any (obj, "db", "database", "dbname", NULL); if (elt) { - backend->dbname = ucl_object_tostring (elt); + if (ucl_object_type (elt) == UCL_STRING) { + backend->dbname = ucl_object_tostring (elt); + } + else if (ucl_object_type (elt) == UCL_INT) { + backend->dbname = ucl_object_tostring_forced (elt); + } } else { backend->dbname = NULL; |