From: Frédéric Marchal Date: Thu, 28 Jan 2010 08:30:02 +0000 (+0000) Subject: Mangle more characters in the user ID to make the resulting file name valid in shell... X-Git-Tag: v2_2_7~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=392760b37c6c50c2ef43be192bde976da9717149;p=thirdparty%2Fsarg.git Mangle more characters in the user ID to make the resulting file name valid in shell commands --- diff --git a/CMakeLists.txt b/CMakeLists.txt index c7721b8..062869d 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,7 +3,7 @@ PROJECT(sarg C) SET(sarg_VERSION 2) SET(sarg_REVISION 2) SET(sarg_BUILD "7") -SET(sarg_BUILDDATE "Jan-27-2010") +SET(sarg_BUILDDATE "Jan-28-2010") INCLUDE(AddFileDependencies) INCLUDE(CheckIncludeFile) diff --git a/ChangeLog b/ChangeLog index e20c67e..0026169 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,6 @@ SARG ChangeLog -Jan-27-2010 Version 2.2.7 +Jan-28-2010 Version 2.2.7 - Extra compile and run time protection (FORTIFY_SOURCE) fixed in configure. - Use tabulations as columns separator in intermediary files to avoid problems when a field of the log contains a space. - Input log file type detection partly rewritten to clearly distinguish which type is processed where. @@ -23,6 +23,7 @@ Jan-27-2010 Version 2.2.7 - Fixed empty entries in squidGuard log when the URL doesn't start with protocol://. - Fixed regressions in creation and reading of a sarg parsed log (thanks to Joao Alves). - Does not report URLs consisting of only a host name ending with .com as a downloaded file. + - Mangle the $ and @ signs in user ID to make the resulting file name valid in shell commands. Jan-06-2010 Version 2.2.6.1 - Remove unnecessary dependency on off_t. diff --git a/html.c b/html.c index 66b9120..90c66f9 100644 --- a/html.c +++ b/html.c @@ -391,7 +391,7 @@ void htmlrel(void) str=siteind; for(z1=0; str[z1]; z1++) { if(str[z1]=='?' || str[z1]=='-' || str[z1]=='.' || str[z1]==':' || str[z1]=='/' || str[z1]=='\\' || str[z1]=='*' || - str[z1]=='\'' || str[z1]=='\"' || str[z1]=='$') + str[z1]=='\'' || str[z1]=='\"' || str[z1]=='$' || str[z1]=='@') str[z1]='_'; } sprintf(href2,"\"T\"",usuario,siteind,tmp6,ltext110,text[55]); diff --git a/include/info.h b/include/info.h index be804d8..4bf8b6f 100755 --- a/include/info.h +++ b/include/info.h @@ -1,3 +1,3 @@ -#define VERSION PACKAGE_VERSION" Jan-27-2010" +#define VERSION PACKAGE_VERSION" Jan-28-2010" #define PGM PACKAGE_NAME #define URL "http://sarg.sourceforge.net" diff --git a/log.c b/log.c index 841f3c9..cfdeaf3 100644 --- a/log.c +++ b/log.c @@ -1117,7 +1117,8 @@ int main(int argc,char *argv[]) for(str=user; *str; str++) { if(*str=='.') dotinuser++; - if(*str=='?' || *str=='.' || *str==':' || *str=='/' || *str=='\\' || *str=='\'') + if(*str=='?' || *str=='.' || *str==':' || *str=='/' || *str=='\\' || *str=='\'' || *str=='$' || *str=='@' || + *str=='\"' || *str=='*') *str='_'; } diff --git a/report.c b/report.c index 05998e7..de0b40c 100644 --- a/report.c +++ b/report.c @@ -218,7 +218,7 @@ void gerarel(void) strcpy(siteind,accurl); for(str=siteind; *str; str++) { if(*str=='?' || *str=='-' || *str=='.' || *str==':' || *str=='/' || *str=='\\' || *str=='*' || - *str=='\'' || *str=='\"' || *str=='$') + *str=='\'' || *str=='\"' || *str=='$' || *str=='@') *str='_'; } sprintf(arqtt,"%s/%s",dirname,accuser);