Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/SoftEtherVPN/SoftEtherVPN_Stable.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/Cedar/Logging.c')
-rw-r--r--src/Cedar/Logging.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/Cedar/Logging.c b/src/Cedar/Logging.c
index 38510bc0..5aaae6d5 100644
--- a/src/Cedar/Logging.c
+++ b/src/Cedar/Logging.c
@@ -1478,12 +1478,19 @@ void AddLogBufToStr(BUF *b, char *name, char *value)
void MakeSafeLogStr(char *str)
{
UINT i, len;
+ bool is_http = false;
// Validate arguments
if (str == NULL)
{
return;
}
+ if (str[0] == 'h' && str[1] == 't' && str[2] == 't' && str[3] == 'p' &&
+ ((str[4] == 's' && str[5] == ':') || (str[4] == ':')))
+ {
+ is_http = true;
+ }
+
EnPrintableAsciiStr(str, '?');
len = StrLen(str);
@@ -1495,7 +1502,10 @@ void MakeSafeLogStr(char *str)
}
else if (str[i] == ' ')
{
- str[i] = '_';
+ if (is_http == false)
+ {
+ str[i] = '_';
+ }
}
}
}
@@ -2242,8 +2252,6 @@ void ReplaceForCsv(char *str)
return;
}
- // If there are blanks, trim it
- Trim(str);
len = StrLen(str);
for (i = 0;i < len;i++)