Index: VERSION ================================================================== --- VERSION +++ VERSION @@ -1,1 +1,1 @@ -2.14 +2.14.1 Index: src/report.c ================================================================== --- src/report.c +++ src/report.c @@ -199,33 +199,37 @@ "ticketchng", "unversioned", }; int lwr = 0; int upr = count(azAllowed) - 1; - int rc = 0; + int cmp = 0; if( zArg1==0 ){ /* Some legacy versions of SQLite will sometimes send spurious ** READ authorizations that have no table name. These can be ** ignored. */ rc = SQLITE_IGNORE; break; } - while( lwr0 ){ + }else if( cmp>0 ){ lwr = i + 1; }else{ break; } } - if( rc ){ + if( cmp ){ + /* Always ok to access tables whose names begin with "fx_" */ + cmp = sqlite3_strnicmp(zArg1, "fx_", 3); + } + if( cmp ){ *(char**)pError = mprintf("access to table \"%s\" is restricted",zArg1); rc = SQLITE_DENY; - }else if( !g.perm.RdAddr && strncmp(zArg2, "private_", 8)==0 ){ + }else if( !g.perm.RdAddr && sqlite3_strnicmp(zArg2, "private_", 8)==0 ){ rc = SQLITE_IGNORE; } break; } default: {