SQLite authorizer: deny dangerous operations that could be exploited via * SQL injection through the Cypher→SQL translation layer. */
| 934 | /* SQLite authorizer: deny dangerous operations that could be exploited via |
| 935 | * SQL injection through the Cypher→SQL translation layer. */ |
| 936 | static int store_authorizer(void *user_data, int action, const char *p3, const char *p4, |
| 937 | const char *p5, const char *p6) { |
| 938 | (void)user_data; |
| 939 | (void)p3; |
| 940 | (void)p4; |
| 941 | (void)p5; |
| 942 | (void)p6; |
| 943 | switch (action) { |
| 944 | case SQLITE_ATTACH: /* ATTACH DATABASE — could create/read arbitrary files */ |
| 945 | case SQLITE_DETACH: /* DETACH DATABASE */ |
| 946 | return SQLITE_DENY; |
| 947 | default: |
| 948 | return SQLITE_OK; |
| 949 | } |
| 950 | } |
| 951 | |
| 952 | static cbm_store_t *store_open_internal(const char *path, bool in_memory, bool create) { |
| 953 | cbm_store_t *s = calloc(CBM_ALLOC_ONE, sizeof(cbm_store_t)); |
nothing calls this directly
no outgoing calls
no test coverage detected