Hide passwords from logs

After the last code refactoring, the hiding of the passwords from logs
feature was left out accidentally.
This commit is contained in:
Lefteris Chatzimparmpas 2012-02-14 20:30:50 +01:00
parent df1e0c172b
commit 09b2cc3a25
1 changed files with 10 additions and 3 deletions

View File

@ -71,9 +71,16 @@ send_request(session *s, const char *fmt,...)
snprintf(obuf.data + obuf.len, obuf.size - obuf.len + 1, "\r\n");
obuf.len = strlen(obuf.data);
debug("sending command (%d):\n\n%s\n", s->socket, obuf.data);
verbose("C (%d): %s", s->socket, obuf.data);
if (!strncasecmp(fmt, "LOGIN", strlen("LOGIN"))) {
debug("sending command (%d):\n\n%.*s*\r\n\n", s->socket,
obuf.len - strlen(s->password) - strlen("\"\"\r\n"),
obuf.data);
verbose("C (%d): %.*s*\r\n", s->socket, obuf.len -
strlen(s->password) - strlen("\"\"\r\n"), obuf.data);
} else {
debug("sending command (%d):\n\n%s\n", s->socket, obuf.data);
verbose("C (%d): %s", s->socket, obuf.data);
}
if (socket_write(s, obuf.data, obuf.len) == -1)
return -1;