mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-14 00:22:38 +03:00
Fix the ATTACH command so that the filename argument can be any expression
and so that if authorizer callback gets a NULL pointer for the filename if the filename argument is anything other than a string literal. Ticket [9013e13dba5b58c7] FossilOrigin-Name: e64e1453a9c204d93de1af92dc0b3ca26762b024
This commit is contained in:
@@ -312,9 +312,11 @@ static void codeAttach(
|
||||
|
||||
#ifndef SQLITE_OMIT_AUTHORIZATION
|
||||
if( pAuthArg ){
|
||||
char *zAuthArg = pAuthArg->u.zToken;
|
||||
if( NEVER(zAuthArg==0) ){
|
||||
goto attach_end;
|
||||
char *zAuthArg;
|
||||
if( pAuthArg->op==TK_STRING ){
|
||||
zAuthArg = pAuthArg->u.zToken;
|
||||
}else{
|
||||
zAuthArg = 0;
|
||||
}
|
||||
rc = sqlite3AuthCheck(pParse, type, zAuthArg, 0, 0);
|
||||
if(rc!=SQLITE_OK ){
|
||||
|
||||
Reference in New Issue
Block a user