sqlite3 icon indicating copy to clipboard operation
sqlite3 copied to clipboard

Support loading extensions

Open talmeme opened this issue 2 years ago • 0 comments

Quick fix that I'm using: Add these lines after sqlite3_open() in main.c's sql_open() :

    status = sqlite3_enable_load_extension(conn, 1);
    if (status != SQLITE_OK) janet_panic(sqlite3_errmsg(conn));

This enables the SQL function load_extension().

Ideally, as per the security warning in https://sqlite.org/c3ref/enable_load_extension.html, the SQL function load_extension() should be disabled, and extension loading should only be done through these SQLite API functions:

  • sqlite3_db_config()
  • sqlite3_load_extension()

talmeme avatar Aug 16 '23 11:08 talmeme