Skip to content

Commit

Permalink
address coding issue
Browse files Browse the repository at this point in the history
  • Loading branch information
mrbaseman committed Oct 31, 2023
1 parent 924a18b commit 9ac8f1c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/http.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,16 +90,14 @@ int http_send(struct tunnel *tunnel, const char *request, ...)
char password[3 * PASSWORD_SIZE + 1];

url_encode(password, tunnel->config->password);
pwstart = strstr(logbuffer, password);

while (pwstart != NULL) {
while ((pwstart = strstr(logbuffer, password))) {
int pos, pwlen, i;

pos = pwstart - logbuffer;
pwlen = strlen(password);
for (i = pos; i < pos + pwlen; i++)
logbuffer[i] = '*';
pwstart = strstr(logbuffer, password);
}
}

Expand Down

0 comments on commit 9ac8f1c

Please sign in to comment.