]> git.ipfire.org Git - thirdparty/sarg.git/commitdiff
Mangle more characters in the user ID to make the resulting file name valid in shell...
authorFrédéric Marchal <fmarchal@users.sourceforge.net>
Thu, 28 Jan 2010 08:30:02 +0000 (08:30 +0000)
committerFrédéric Marchal <fmarchal@users.sourceforge.net>
Thu, 28 Jan 2010 08:30:02 +0000 (08:30 +0000)
CMakeLists.txt
ChangeLog
html.c
include/info.h
log.c
report.c

index c7721b81449c9209f979f51e67608616cbdfa99c..062869d52c498e2816f368c272acfae4974980f9 100755 (executable)
@@ -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)
index e20c67e33230cf8cb48059b7e84967cdecc9d953..0026169ff68e6964050e7dc798dc6e63836d545e 100644 (file)
--- 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 66b9120fa23fb49e987ddabe5a492fcb4f8f2036..90c66f91eac4887b2214f7a5d0258d3bd06d96c8 100644 (file)
--- 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,"<a href=\"tt%s-%s.html\"><img src=\"%s/datetime.png\" border=\"0\" title=\"%s %s\" alt=\"T\"></a>",usuario,siteind,tmp6,ltext110,text[55]);
index be804d816a3b43553b244d7d3cf96dce64e92e06..4bf8b6f1ded8969f80b46525aab6281b38263a0c 100755 (executable)
@@ -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 841f3c9fa0c2614f23895158091682b8d31ebf52..cfdeaf30ba016f558a9c4054aedb030639568337 100644 (file)
--- 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='_';
          }
 
index 05998e7fbd62be389beb1e85af211cc394d3d7f1..de0b40c926bd69283d973c85df12585e70773c84 100644 (file)
--- 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);