imap logged the passwd in protocol traces, pop didn't, so I made them both
be the same (the way that is most useful when debugging protocol traces)
Showing
1 changed file
with
5 additions
and
3 deletions
... | @@ -437,7 +437,10 @@ pop_user (authority_t auth) | ... | @@ -437,7 +437,10 @@ pop_user (authority_t auth) |
437 | CHECK_ERROR_CLOSE (mbox, mpd, EACCES); | 437 | CHECK_ERROR_CLOSE (mbox, mpd, EACCES); |
438 | } | 438 | } |
439 | if (mpd->passwd) | 439 | if (mpd->passwd) |
440 | free (mpd->passwd); | 440 | { |
441 | free (mpd->passwd); | ||
442 | mpd->passwd = NULL; | ||
443 | } | ||
441 | /* Was it in the URL? */ | 444 | /* Was it in the URL? */ |
442 | { | 445 | { |
443 | size_t n = 0; | 446 | size_t n = 0; |
... | @@ -455,13 +458,12 @@ pop_user (authority_t auth) | ... | @@ -455,13 +458,12 @@ pop_user (authority_t auth) |
455 | CHECK_ERROR_CLOSE (mbox, mpd, EINVAL); | 458 | CHECK_ERROR_CLOSE (mbox, mpd, EINVAL); |
456 | } | 459 | } |
457 | status = pop_writeline (mpd, "PASS %s\r\n", mpd->passwd); | 460 | status = pop_writeline (mpd, "PASS %s\r\n", mpd->passwd); |
458 | /* MAILBOX_DEBUG0 (mbox, MU_DEBUG_PROT, mpd->buffer); */ | 461 | MAILBOX_DEBUG0 (mbox, MU_DEBUG_PROT, mpd->buffer); |
459 | /* We have to nuke the passwd. */ | 462 | /* We have to nuke the passwd. */ |
460 | memset (mpd->passwd, '\0', strlen (mpd->passwd)); | 463 | memset (mpd->passwd, '\0', strlen (mpd->passwd)); |
461 | free (mpd->passwd); | 464 | free (mpd->passwd); |
462 | mpd->passwd = NULL; | 465 | mpd->passwd = NULL; |
463 | CHECK_ERROR_CLOSE (mbox, mpd, status); | 466 | CHECK_ERROR_CLOSE (mbox, mpd, status); |
464 | MAILBOX_DEBUG0 (mbox, MU_DEBUG_PROT, "PASS *\n"); | ||
465 | mpd->state = POP_AUTH_PASS; | 467 | mpd->state = POP_AUTH_PASS; |
466 | 468 | ||
467 | case POP_AUTH_PASS: | 469 | case POP_AUTH_PASS: | ... | ... |
-
Please register or sign in to post a comment