Disable runtime extension loading unless enabled

This commit is contained in:
PThorpe92
2025-09-22 09:42:28 -04:00
parent 4ac4aff30c
commit 8420b9be04

View File

@@ -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)?;