Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support loading extensions #19

Open
talmeme opened this issue Aug 16, 2023 · 0 comments · May be fixed by #20
Open

Support loading extensions #19

talmeme opened this issue Aug 16, 2023 · 0 comments · May be fixed by #20

Comments

@talmeme
Copy link

talmeme commented Aug 16, 2023

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 talmeme linked a pull request Sep 10, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant