mirror of
https://github.com/sqlite/sqlite.git
synced 2025-09-09 21:09:38 +03:00
Do not allow direct access to internal-use SQL functions such as
sqlite_rename_column() and sqlite3_rename_table() except when the new SQLITE_TESTCTRL_INTERNAL_FUNCTIONS flag is set. FossilOrigin-Name: 6e1330545e7b74fe5f1f20751a3425e2788441485fc07fcb7626e448c72027ce
This commit is contained in:
@@ -771,6 +771,15 @@ static int resolveExprStep(Walker *pWalker, Expr *pExpr){
|
||||
notValid(pParse, pNC, "non-deterministic functions",
|
||||
NC_IdxExpr|NC_PartIdx);
|
||||
}
|
||||
if( (pDef->funcFlags & SQLITE_FUNC_INTERNAL)!=0
|
||||
&& pParse->nested==0
|
||||
&& sqlite3Config.bInternalFunctions==0
|
||||
){
|
||||
/* Internal-use-only functions are disallowed unless the
|
||||
** SQL is being compiled using sqlite3NestedParse() */
|
||||
no_such_func = 1;
|
||||
pDef = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if( 0==IN_RENAME_OBJECT ){
|
||||
|
Reference in New Issue
Block a user