mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-16 23:02:26 +03:00
When inserting a row into a child table, invoke the authorization callback to request permission to read the parent key columns.
FossilOrigin-Name: 9842f2d5f606eb8f641ecae9fbc5368b8d7e4286
This commit is contained in:
@@ -732,6 +732,13 @@ void sqlite3FkCheck(
|
||||
if( aiCol[i]==pTab->iPKey ){
|
||||
aiCol[i] = -1;
|
||||
}
|
||||
#ifndef SQLITE_OMIT_AUTHORIZATION
|
||||
/* Request permission to read the parent key columns. */
|
||||
if( db->xAuth ){
|
||||
char *zCol = pTo->aCol[pIdx ? pIdx->aiColumn[i] : pTo->iPKey].zName;
|
||||
sqlite3AuthReadCol(pParse, pTo->zName, zCol, iDb, 0);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Take a shared-cache advisory read-lock on the parent table. Allocate
|
||||
|
||||
Reference in New Issue
Block a user