Fossil SCM

Add reminder hints to the authorizer function header comments about how to test those functions using the "test-db-prepare" command.

drh 2021-06-14 19:48 tktschema-allow-drop
Commit b594f486efdf61b8aa65f73e55ee3e8283a24760ffba01ea1662b2ef0856761c
2 files changed +3 +3
--- src/report.c
+++ src/report.c
@@ -161,10 +161,13 @@
161161
/*
162162
** This is the SQLite authorizer callback used to make sure that the
163163
** SQL statements entered by users do not try to do anything untoward.
164164
** If anything suspicious is tried, set *(char**)pError to an error
165165
** message obtained from malloc.
166
+**
167
+** Use the "fossil test-db-prepare --auth-report SQL" command to perform
168
+** manual testing of this authorizer.
166169
*/
167170
static int report_query_authorizer(
168171
void *pError,
169172
int code,
170173
const char *zArg1,
171174
--- src/report.c
+++ src/report.c
@@ -161,10 +161,13 @@
161 /*
162 ** This is the SQLite authorizer callback used to make sure that the
163 ** SQL statements entered by users do not try to do anything untoward.
164 ** If anything suspicious is tried, set *(char**)pError to an error
165 ** message obtained from malloc.
 
 
 
166 */
167 static int report_query_authorizer(
168 void *pError,
169 int code,
170 const char *zArg1,
171
--- src/report.c
+++ src/report.c
@@ -161,10 +161,13 @@
161 /*
162 ** This is the SQLite authorizer callback used to make sure that the
163 ** SQL statements entered by users do not try to do anything untoward.
164 ** If anything suspicious is tried, set *(char**)pError to an error
165 ** message obtained from malloc.
166 **
167 ** Use the "fossil test-db-prepare --auth-report SQL" command to perform
168 ** manual testing of this authorizer.
169 */
170 static int report_query_authorizer(
171 void *pError,
172 int code,
173 const char *zArg1,
174
+3
--- src/tkt.c
+++ src/tkt.c
@@ -395,10 +395,13 @@
395395
**
396396
** Of particular importance for security is that this routine
397397
** disallows data changes on the "config" table, as that could
398398
** allow a malicious server to modify settings in such a way as
399399
** to cause a remote code execution.
400
+**
401
+** Use the "fossil test-db-prepare --auth-ticket SQL" command to perform
402
+** manual testing of this authorizer.
400403
*/
401404
static int ticket_schema_auth(
402405
void *pNErr,
403406
int eCode,
404407
const char *z0,
405408
--- src/tkt.c
+++ src/tkt.c
@@ -395,10 +395,13 @@
395 **
396 ** Of particular importance for security is that this routine
397 ** disallows data changes on the "config" table, as that could
398 ** allow a malicious server to modify settings in such a way as
399 ** to cause a remote code execution.
 
 
 
400 */
401 static int ticket_schema_auth(
402 void *pNErr,
403 int eCode,
404 const char *z0,
405
--- src/tkt.c
+++ src/tkt.c
@@ -395,10 +395,13 @@
395 **
396 ** Of particular importance for security is that this routine
397 ** disallows data changes on the "config" table, as that could
398 ** allow a malicious server to modify settings in such a way as
399 ** to cause a remote code execution.
400 **
401 ** Use the "fossil test-db-prepare --auth-ticket SQL" command to perform
402 ** manual testing of this authorizer.
403 */
404 static int ticket_schema_auth(
405 void *pNErr,
406 int eCode,
407 const char *z0,
408

Keyboard Shortcuts

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