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]
Commit
58f15e92aecf31289734e73815006d1b965a2a57
Parent
c8b86eae78bba29…
1 file changed
+5
+5
| --- src/report.c | ||
| +++ src/report.c | ||
| @@ -677,10 +677,15 @@ | ||
| 677 | 677 | rn = pState->rn; |
| 678 | 678 | |
| 679 | 679 | /* Do initialization |
| 680 | 680 | */ |
| 681 | 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 | + | |
| 682 | 687 | /* Figure out the number of columns, the column that determines background |
| 683 | 688 | ** color, and whether or not this row of data is represented by multiple |
| 684 | 689 | ** rows in the table. |
| 685 | 690 | */ |
| 686 | 691 | pState->nCol = 0; |
| 687 | 692 |
| --- 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 |