From 48182ca52b9faadefe2e04e693ebdaff0014cb85 Mon Sep 17 00:00:00 2001 From: Ashish Gupta Date: Sun, 8 Oct 2017 16:06:26 +0200 Subject: Stop printing POST data on debug board (fixes passwords showing up) --- content/fetchers/httplib_kolibri.c | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) (limited to 'content') diff --git a/content/fetchers/httplib_kolibri.c b/content/fetchers/httplib_kolibri.c index 711b5d827..f9a0d9531 100644 --- a/content/fetchers/httplib_kolibri.c +++ b/content/fetchers/httplib_kolibri.c @@ -113,7 +113,7 @@ void *setup_fetch(struct fetch *parent_fetch, struct nsurl *url, struct fetch_multipart_data *printer = post_multipart; while(printer != NULL) { LOG("Multipart POST : (%s = %s)\n", printer->name, printer->value); - debug_board_printf("Multipart POST : (%s = %s)\n", printer->name, printer->value); + /* debug_board_printf("Multipart POST : (%s = %s)\n", printer->name, printer->value); */ printer = printer->next; } @@ -144,7 +144,7 @@ void *setup_fetch(struct fetch *parent_fetch, struct nsurl *url, content = realloc(content, contentlen); char *tmp = content; - debug_board_printf("Before Loop tmp = %u\n", tmp); + /* debug_board_printf("Before Loop tmp = %u\n", tmp); */ printer = post_multipart; while(printer != NULL) { @@ -152,22 +152,22 @@ void *setup_fetch(struct fetch *parent_fetch, struct nsurl *url, strcpy(tmp, iboundary); tmp+=strlen(iboundary); - debug_board_printf("tmp = %u\n", tmp); + /* debug_board_printf("tmp = %u\n", tmp); */ *tmp++ = '\r'; *tmp++ = '\n'; - debug_board_printf("tmp = %u\n", tmp); + /* debug_board_printf("tmp = %u\n", tmp); */ strcpy(tmp, "Content-Disposition: form-data; name=\""); tmp+= strlen("Content-Disposition: form-data; name=\""); - debug_board_printf("tmp = %u\n", tmp); + /* debug_board_printf("tmp = %u\n", tmp); */ strcpy(tmp, printer->name); tmp += strlen(printer->name); - debug_board_printf("tmp = %u\n", tmp); + /* debug_board_printf("tmp = %u\n", tmp); */ *tmp++ = '"'; *tmp++ = '\r'; @@ -175,22 +175,22 @@ void *setup_fetch(struct fetch *parent_fetch, struct nsurl *url, *tmp++ = '\r'; *tmp++ = '\n'; - debug_board_printf("tmp = %u\n", tmp); + /* debug_board_printf("tmp = %u\n", tmp); */ strcpy(tmp, printer->value); tmp += strlen(printer->value); - debug_board_printf("tmp = %u\n", tmp); + /* debug_board_printf("tmp = %u\n", tmp); */ *tmp++ = '\r'; *tmp++ = '\n'; - debug_board_printf("END OF LOOP tmp = %u\n", tmp); + /* debug_board_printf("END OF LOOP tmp = %u\n", tmp); */ printer = printer->next; } - debug_board_printf("AFTER LOOP tmp = %u, content=%u\n", tmp, content); + /* debug_board_printf("AFTER LOOP tmp = %u, content=%u\n", tmp, content); */ strcpy(tmp, iboundary); tmp+=strlen(iboundary); @@ -203,7 +203,7 @@ void *setup_fetch(struct fetch *parent_fetch, struct nsurl *url, *tmp='\0'; - debug_board_printf("TERMINATING NULL tmp = %u\n", tmp); + /* debug_board_printf("TERMINATING NULL tmp = %u\n", tmp); */ LOG("Multipart request content length : %d", contentlen); LOG("Multipart request content: %s", content); @@ -212,12 +212,11 @@ void *setup_fetch(struct fetch *parent_fetch, struct nsurl *url, if(request != NULL) { int datasent = 0; - - debug_board_printf("--- Sending data : %s with length %u\n", content, contentlen); - LOG("--- Sending data : with length %u\n", contentlen); + /* debug_board_printf("--- Sending data : %s with length %u\n", content, contentlen); */ + /* LOG("--- Sending data : with length %u\n", contentlen); */ datasent = http_send_asm(request, content, contentlen - 1); - debug_board_printf("--- Sent %d bytes of data.\n", datasent); - LOG("--- Sent %d bytes of data.\n", datasent); + /* debug_board_printf("--- Sent %d bytes of data.\n", datasent); */ + LOG("--- Sent %d bytes of multipart post data.\n", datasent); } } else if(post_urlenc) { @@ -226,9 +225,9 @@ void *setup_fetch(struct fetch *parent_fetch, struct nsurl *url, if(request != NULL) { int datasent = 0; /* Send all the data here itself. Move this later to polling maybe. */ - debug_board_printf("--- Sending data : %s with length %u\n", post_urlenc, strlen(post_urlenc)); + /* debug_board_printf("--- Sending data : %s with length %u\n", post_urlenc, strlen(post_urlenc)); */ datasent = http_send_asm(request, post_urlenc, strlen(post_urlenc)); - debug_board_printf("--- Sent %d bytes of data.\n", datasent); + LOG("--- Sent %d bytes of urlencoded data.\n", datasent); } } else { -- cgit v1.2.3