1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-05 15:55:57 +03:00

When UNSAFE_IN_VIEW is disabled, only allow functions in views that are

tagged with SQLITE_INNOCUOUS.

FossilOrigin-Name: 9ee79b254e4c51a2a41f7ed49ad389d8d7105e649483adb79772052fa0ade3c0
This commit is contained in:
drh
2020-01-03 20:57:38 +00:00
parent 9ee00200ef
commit c4ad849921
6 changed files with 58 additions and 37 deletions

View File

@@ -1760,7 +1760,9 @@ int sqlite3CreateFunc(
assert( SQLITE_FUNC_CONSTANT==SQLITE_DETERMINISTIC );
assert( SQLITE_FUNC_DIRECT==SQLITE_DIRECTONLY );
extraFlags = enc & (SQLITE_DETERMINISTIC|SQLITE_DIRECTONLY|SQLITE_SUBTYPE);
assert( SQLITE_FUNC_SAFE==SQLITE_INNOCUOUS );
extraFlags = enc & (SQLITE_DETERMINISTIC|SQLITE_DIRECTONLY|
SQLITE_SUBTYPE|SQLITE_INNOCUOUS);
enc &= (SQLITE_FUNC_ENCMASK|SQLITE_ANY);
#ifndef SQLITE_OMIT_UTF16