Fossil SCM

Disable SQL restrictions as soon as the user-supplied report-generator SQL has been parsed, so that other queries that run during report rendering and run unimpeded. Ticket [c666e737cb028bcec2d55659d79ce8521355d2bf]

drh 2009-01-08 14:05 trunk
Commit 58f15e92aecf31289734e73815006d1b965a2a57
1 file changed +5
--- src/report.c
+++ src/report.c
@@ -677,10 +677,15 @@
677677
rn = pState->rn;
678678
679679
/* Do initialization
680680
*/
681681
if( pState->nCount==0 ){
682
+ /* Turn off the authorizer. It is no longer doing anything since the
683
+ ** query has already been prepared.
684
+ */
685
+ sqlite3_set_authorizer(g.db, 0, 0);
686
+
682687
/* Figure out the number of columns, the column that determines background
683688
** color, and whether or not this row of data is represented by multiple
684689
** rows in the table.
685690
*/
686691
pState->nCol = 0;
687692
--- src/report.c
+++ src/report.c
@@ -677,10 +677,15 @@
677 rn = pState->rn;
678
679 /* Do initialization
680 */
681 if( pState->nCount==0 ){
 
 
 
 
 
682 /* Figure out the number of columns, the column that determines background
683 ** color, and whether or not this row of data is represented by multiple
684 ** rows in the table.
685 */
686 pState->nCol = 0;
687
--- src/report.c
+++ src/report.c
@@ -677,10 +677,15 @@
677 rn = pState->rn;
678
679 /* Do initialization
680 */
681 if( pState->nCount==0 ){
682 /* Turn off the authorizer. It is no longer doing anything since the
683 ** query has already been prepared.
684 */
685 sqlite3_set_authorizer(g.db, 0, 0);
686
687 /* Figure out the number of columns, the column that determines background
688 ** color, and whether or not this row of data is represented by multiple
689 ** rows in the table.
690 */
691 pState->nCol = 0;
692

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button