aboutsummaryrefslogtreecommitdiff
path: root/ext/misc/csv.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/misc/csv.c')
-rw-r--r--ext/misc/csv.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/ext/misc/csv.c b/ext/misc/csv.c
index 09e970ee7..71e3828c7 100644
--- a/ext/misc/csv.c
+++ b/ext/misc/csv.c
@@ -632,6 +632,15 @@ static int csvtabConnect(
for(i=0; i<sizeof(azPValue)/sizeof(azPValue[0]); i++){
sqlite3_free(azPValue[i]);
}
+ /* Rationale for DIRECTONLY:
+ ** An attacker who controls a database schema could use this vtab
+ ** to exfiltrate sensitive data from other files in the filesystem.
+ ** And, recommended practice is to put all CSV virtual tables in the
+ ** TEMP namespace, so they should still be usable from within TEMP
+ ** views, so there shouldn't be a serious loss of functionality by
+ ** prohibiting the use of this vtab from persistent triggers and views.
+ */
+ sqlite3_vtab_config(db, SQLITE_VTAB_DIRECTONLY);
return SQLITE_OK;
csvtab_connect_oom: