diff --git a/core/vdbe/execute.rs b/core/vdbe/execute.rs index ec1c9b526..efe652686 100644 --- a/core/vdbe/execute.rs +++ b/core/vdbe/execute.rs @@ -4781,6 +4781,9 @@ pub fn op_function( #[cfg(feature = "fs")] #[cfg(not(target_family = "wasm"))] ScalarFunc::LoadExtension => { + if !program.connection.db.can_load_extensions() { + crate::bail_parse_error!("runtime extension loading is disabled"); + } let extension = &state.registers[*start_reg]; let ext = resolve_ext_path(&extension.get_value().to_string())?; program.connection.load_extension(ext)?;