added: now winix will not log post parameters with 'pass' in names (at the beginning)
changed: only first few characters are logged (from POST) git-svn-id: svn://ttmath.org/publicrep/winix/trunk@733 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
* This file is a part of Winix
|
||||
* and is not publicly distributed
|
||||
*
|
||||
* Copyright (c) 2008-2010, Tomasz Sowa
|
||||
* Copyright (c) 2008-2011, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
@@ -211,8 +211,6 @@ return true;
|
||||
|
||||
void PostMultiParser::LogFirst(const std::string & to_log, size_t len)
|
||||
{
|
||||
size_t i;
|
||||
|
||||
if( len > to_log.size() )
|
||||
len = to_log.size();
|
||||
|
||||
@@ -224,15 +222,7 @@ size_t i;
|
||||
log << "empty";
|
||||
|
||||
log << "): \"";
|
||||
|
||||
for(i=0 ; i<len ; ++i)
|
||||
{
|
||||
if( to_log[i] < 32 )
|
||||
log << '.';
|
||||
else
|
||||
log << to_log[i];
|
||||
}
|
||||
|
||||
log.LogString(to_log, len);
|
||||
log << "\"" << logend;
|
||||
}
|
||||
|
||||
@@ -312,7 +302,7 @@ time_t t1, t2;
|
||||
content.clear();
|
||||
content.reserve(WINIX_POSTMULTI_OUTPUT_BUFFER);
|
||||
content_len = 0;
|
||||
t1 = time(0);
|
||||
t1 = time(0);
|
||||
|
||||
ReadContentToFileLoop();
|
||||
|
||||
@@ -357,7 +347,9 @@ void PostMultiParser::ReadContent()
|
||||
ReadContentLoop();
|
||||
|
||||
log << log2 << "PMP: content size: " << content_len << " bytes" << logend;
|
||||
LogFirst(content, 200);
|
||||
|
||||
if( !IsSubStringNoCase("pass", name.c_str()) )
|
||||
LogFirst(content, config->log_post_value_size);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user