Leaving the loading of extensions enabled might be a security risk (#1558)

* Leaving the loading of extensions enabled might be a security risk

Using sqlite3_enable_load_extension not only allows loading extensions
through the C-API but also through the SQL functioon load_extension().
That might be a security risk if the user is unaware that executing an
SQL file can lead to native code execution and not only to database file
modification.

See issue #1551

* Preference for allowing loading extensions from SQL code

New setting that authorizes the execution of load_extension() from SQL
code. Default value, false, following the design decision of SQLite, that
disables this function unless by default.

Added notice about the option in the calltips of the two function
variants.
This commit is contained in:
Manuel
2018-10-10 21:26:59 +02:00
committed by Martin Kleusberg
parent 16ba6db2dc
commit 5cf00ddd8d
5 changed files with 31 additions and 9 deletions

View File

@@ -1268,6 +1268,16 @@ Can be set to 0 for disabling completion.</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkAllowLoadExtension">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;SQLite provides an SQL function for loading extensions from a shared library file. Activate this if you want to use the &lt;span style=&quot; font-style:italic;&quot;&gt;load_extension()&lt;/span&gt; function from SQL code.&lt;/p&gt;&lt;p&gt;For security reasons, extension loading is turned off by default and must be enabled through this setting. You can always load extensions through the GUI, even though this option is disabled.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Allow loading extensions from SQL code</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="tabRemote">