Is it possible to test if extension loading is enabled in SQLite 3 from C interface or using SQL without actually trying to load an extension?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can use this query to check if extension loading is enabled by default:
But this works for you only if you know that
sqlite3_enable_load_extensionis never called.The internal
SQLITE_LoadExtensionflag is not accessible; it is read only when SQLite actually tries to load an extension.What you could do is to try to load a known-invalid extension, such as
load_extension('/dev/null'). If extension loading is disabled, the error message will benot authorizedinstead of something likefile too short.