Skip to content

Commit 0d627f7

Browse files
committed
Fix issue with user authentication and VACUUM
The original user authentication extension checks the wrong database on attaching a database. This results in errors if the attached database is not under user authentication control (like on executing a VACUUM command).
1 parent 834078b commit 0d627f7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/userauth.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ static int userAuthCheckLogin(
9090
int rc;
9191

9292
*peAuth = UAUTH_Unknown;
93-
if( !userTableExists(db, "main") ){
93+
if( !userTableExists(db, zDb) ){
9494
*peAuth = UAUTH_Admin; /* No sqlite_user table. Everybody is admin. */
9595
return SQLITE_OK;
9696
}

0 commit comments

Comments
 (0)