From 2d0175a1ec7e41cfb923ef175c6b48d094f532a7 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Thu, 9 Aug 2007 08:12:15 +0000 Subject: - fixed a bug in outchannel code that caused templates to be incorrectly parsed - fixed a bug in ommysql that caused a wrong ";template" missing message in some cases --- ChangeLog | 4 ++++ omfile.c | 8 -------- ommysql.c | 2 +- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index c7c6e5ff..ea9a6f31 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ --------------------------------------------------------------------------- Version 1.18.2 (rgerhards), 2007-08-?? +- fixed a bug in outchannel code that caused templates to be incorrectly + parsed +- fixed a bug in ommysql that caused a wrong ";template" missing message + in some cases --------------------------------------------------------------------------- Version 1.18.1 (rgerhards), 2007-08-08 - applied a patch from varmojfekoj which solved a potential segfault diff --git a/omfile.c b/omfile.c index 6f30108b..af594024 100644 --- a/omfile.c +++ b/omfile.c @@ -237,14 +237,6 @@ static rsRetVal cflineParseOutchannel(instanceData *pData, uchar* p, omodStringR */ pData->f_sizeLimitCmd = pOch->cmdOnSizeLimit; - /* back to the input string - now let's look for the template to use - * Just as a general precaution, we skip whitespace. - */ - while(*p && isspace((int) *p)) - ++p; - if(*p == ';') - ++p; /* eat it */ - iRet = cflineParseTemplateName(&p, pOMSR, iEntry, iTplOpts, (uchar*) " TradFmt"); return(iRet); diff --git a/ommysql.c b/ommysql.c index 6fe4dccd..fac4c182 100644 --- a/ommysql.c +++ b/ommysql.c @@ -270,7 +270,7 @@ CODE_STD_STRING_REQUESTparseSelectorAct(1) * We specify that the SQL option must be present in the template. * This is for your own protection (prevent sql injection). */ - if(*p != ';') + if(*(p-1) == ';') --p; /* TODO: the whole parsing of the MySQL module needs to be re-thought - but this here * is clean enough for the time being -- rgerhards, 2007-07-30 */ -- cgit