From c3fb80a1c8b5312ecb2a43ce34acd2d06e447f54 Mon Sep 17 00:00:00 2001 From: Cory McWilliams Date: Sun, 4 Sep 2022 01:36:55 +0000 Subject: [PATCH] Allow enough things for json_each to work. git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3970 ed5197a5-7fde-0310-b194-c3ffbd925b24 --- src/ssb.db.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/ssb.db.c b/src/ssb.db.c index 82847c01..d8d5dc6b 100644 --- a/src/ssb.db.c +++ b/src/ssb.db.c @@ -535,11 +535,16 @@ static int _tf_ssb_sqlite_authorizer(void* user_data, int action_code, const cha case SQLITE_FUNCTION: return SQLITE_OK; case SQLITE_READ: - return - (strcmp(arg0, "messages") == 0 || - strcmp(arg0, "blob_wants") == 0) + return ( + strcmp(arg0, "blob_wants") == 0 || + strcmp(arg0, "json_each") == 0 || + strcmp(arg0, "messages") == 0 || + strcmp(arg0, "sqlite_master") == 0 || + false) ? SQLITE_OK : SQLITE_DENY; break; + case SQLITE_UPDATE: + return SQLITE_OK; } return SQLITE_DENY; }