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
This commit is contained in:
Cory McWilliams 2022-09-04 01:36:55 +00:00
parent 7c29c1e18e
commit c3fb80a1c8

View File

@ -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;
}