Index: cgi.c
--- cgi.c.orig 2006-12-14 01:45:51.000000000 +0100
+++ cgi.c 2015-01-12 12:25:55.196337822 +0100
@@ -60,8 +60,7 @@
** Provide a reliable implementation of a caseless string comparison
** function.
*/
-#define stricmp sqlite3StrICmp
-extern int sqlite3StrICmp(const char*, const char*);
+#define stricmp strcasecmp
/*
** The body of the HTTP reply text is stored here.
Index: common.c
--- common.c.orig 2006-12-14 01:29:24.000000000 +0100
+++ common.c 2015-01-12 12:25:55.196337822 +0100
@@ -397,7 +397,7 @@
/* We don't want to be redirected back to captcha page, but ratehr to
** one from which we were redirected to captcha in the first place.
*/
- const char *zUri = (P("cnxp")!=0) ? P("cnxp") : getenv("REQUEST_URI");
+ const char *zUri = (P("nxp")!=0) ? P("nxp") : getenv("REQUEST_URI");
@
@ Not logged in
}
Index: config.h
--- config.h.orig 2007-01-28 00:29:40.000000000 +0100
+++ config.h 2015-01-12 12:25:55.196337822 +0100
@@ -93,3 +93,4 @@
# undef CVSTRAC_I18N
# define CVSTRAC_I18N 0
#endif
+
Index: db.c
--- db.c.orig 2007-01-28 19:40:07.000000000 +0100
+++ db.c 2015-01-12 12:25:55.196337822 +0100
@@ -125,7 +125,6 @@
** routine NULLs-out fields of the database we do not want arbitrary
** users to see, such as the USER.PASSWD field.
*/
-extern int sqlite3StrICmp(const char*, const char*);
static int access_authorizer(
void *NotUsed,
int type,
@@ -141,34 +140,34 @@
return SQLITE_OK;
#endif
}else if( type==SQLITE_READ ){
- if( sqlite3StrICmp(zArg1,"user")==0 ){
- if( sqlite3StrICmp(zArg2,"passwd")==0 || sqlite3StrICmp(zArg2,"email")==0 ){
+ if( strcasecmp(zArg1,"user")==0 ){
+ if( strcasecmp(zArg2,"passwd")==0 || strcasecmp(zArg2,"email")==0 ){
return SQLITE_IGNORE;
}
- }else if( sqlite3StrICmp(zArg1, "cookie")==0 ){
+ }else if( strcasecmp(zArg1, "cookie")==0 ){
return SQLITE_IGNORE;
- }else if( sqlite3StrICmp(zArg1, "config")==0 ){
+ }else if( strcasecmp(zArg1, "config")==0 ){
return SQLITE_IGNORE;
- }else if( !g.okSetup && sqlite3StrICmp(zArg1, "access_load")==0 ){
+ }else if( !g.okSetup && strcasecmp(zArg1, "access_load")==0 ){
return SQLITE_IGNORE;
- }else if( (!g.okWrite || g.isAnon) && sqlite3StrICmp(zArg1,"ticket")==0
- && sqlite3StrICmp(zArg2,"contact")==0){
+ }else if( (!g.okWrite || g.isAnon) && strcasecmp(zArg1,"ticket")==0
+ && strcasecmp(zArg2,"contact")==0){
return SQLITE_IGNORE;
- }else if( !g.okCheckout && sqlite3StrICmp(zArg1,"chng")==0 ){
+ }else if( !g.okRead && strcasecmp(zArg1,"chng")==0 ){
return SQLITE_IGNORE;
- }else if( !g.okCheckout && sqlite3StrICmp(zArg1,"filechng")==0 ){
+ }else if( !g.okCheckout && strcasecmp(zArg1,"filechng")==0 ){
return SQLITE_IGNORE;
- }else if( !g.okCheckout && sqlite3StrICmp(zArg1,"file")==0 ){
+ }else if( !g.okCheckout && strcasecmp(zArg1,"file")==0 ){
return SQLITE_IGNORE;
- }else if( !g.okCheckout && sqlite3StrICmp(zArg1,"inspect")==0 ){
+ }else if( !g.okRead && strcasecmp(zArg1,"inspect")==0 ){
return SQLITE_IGNORE;
- }else if( !g.okRead && sqlite3StrICmp(zArg1,"ticket")==0 ){
+ }else if( !g.okRead && strcasecmp(zArg1,"ticket")==0 ){
return SQLITE_IGNORE;
- }else if( !g.okRead && sqlite3StrICmp(zArg1,"tktchng")==0 ){
+ }else if( !g.okRead && strcasecmp(zArg1,"tktchng")==0 ){
return SQLITE_IGNORE;
- }else if( !g.okRdWiki && sqlite3StrICmp(zArg1,"attachment")==0 ){
+ }else if( !g.okRdWiki && strcasecmp(zArg1,"attachment")==0 ){
return SQLITE_IGNORE;
- }else if( !g.okRdWiki && sqlite3StrICmp(zArg1,"wiki")==0 ){
+ }else if( !g.okRdWiki && strcasecmp(zArg1,"wiki")==0 ){
return SQLITE_IGNORE;
}
return SQLITE_OK;
@@ -672,7 +671,6 @@
** name as an argument and returns the value that the user enters in the
** resulting HTML form. A second optional parameter provides a default value.
*/
-extern int sqlite3StrICmp(const char*, const char*);
static void f_aux(sqlite3_context *context, int argc, sqlite3_value **argv){
int i;
const char *zParm;
@@ -682,7 +680,7 @@
if( zParm==0 ) return;
for(i=0; i0 ){
char *zOut = calloc(nBytes,1);
Index: format.c
--- format.c.orig 2007-01-28 23:50:24.000000000 +0100
+++ format.c 2015-01-12 12:25:55.196337822 +0100
@@ -701,11 +701,10 @@
** Return TRUE if the HTML element given in the argument is a form of
** external reference (i.e. A, IMG, etc).
*/
-extern int sqlite3StrNICmp(const char *, const char*, int);
static int isLinkTag(const char *zElem, int nElem){
- return (nElem==1 && 0==sqlite3StrNICmp(zElem,"A",nElem))
- || (nElem==3 && 0==sqlite3StrNICmp(zElem,"IMG",nElem))
- || (nElem==4 && 0==sqlite3StrNICmp(zElem,"CITE",nElem));
+ return (nElem==1 && 0==strncasecmp(zElem,"A",nElem))
+ || (nElem==3 && 0==strncasecmp(zElem,"IMG",nElem))
+ || (nElem==4 && 0==strncasecmp(zElem,"CITE",nElem));
}
/*
@@ -713,12 +712,11 @@
** before it ends, then return the number of characters through the end of
** the