Obscure the passwd.
Showing
2 changed files
with
7 additions
and
1 deletions
... | @@ -69,6 +69,8 @@ mu_pop3_apop (mu_pop3_t pop3, const char *user, const char *secret) | ... | @@ -69,6 +69,8 @@ mu_pop3_apop (mu_pop3_t pop3, const char *user, const char *secret) |
69 | *tmp = '\0'; | 69 | *tmp = '\0'; |
70 | 70 | ||
71 | status = mu_pop3_writeline (pop3, "APOP %s %s\r\n", user, digest); | 71 | status = mu_pop3_writeline (pop3, "APOP %s %s\r\n", user, digest); |
72 | /* Obscure the digest, for security reasons. */ | ||
73 | memset (digest, '\0', sizeof digest); | ||
72 | MU_POP3_CHECK_ERROR (pop3, status); | 74 | MU_POP3_CHECK_ERROR (pop3, status); |
73 | mu_pop3_debug_cmd (pop3); | 75 | mu_pop3_debug_cmd (pop3); |
74 | pop3->state = MU_POP3_APOP; | 76 | pop3->state = MU_POP3_APOP; |
... | @@ -77,6 +79,8 @@ mu_pop3_apop (mu_pop3_t pop3, const char *user, const char *secret) | ... | @@ -77,6 +79,8 @@ mu_pop3_apop (mu_pop3_t pop3, const char *user, const char *secret) |
77 | case MU_POP3_APOP: | 79 | case MU_POP3_APOP: |
78 | status = mu_pop3_send (pop3); | 80 | status = mu_pop3_send (pop3); |
79 | MU_POP3_CHECK_EAGAIN (pop3, status); | 81 | MU_POP3_CHECK_EAGAIN (pop3, status); |
82 | /* Obscure the digest, for security reasons. */ | ||
83 | memset (pop3->io.buf, '\0', pop3->io.len); | ||
80 | pop3->acknowledge = 0; | 84 | pop3->acknowledge = 0; |
81 | pop3->state = MU_POP3_APOP_ACK; | 85 | pop3->state = MU_POP3_APOP_ACK; |
82 | 86 | ... | ... |
1 | /* GNU Mailutils -- a suite of utilities for electronic mail | 1 | /* GNU Mailutils -- a suite of utilities for electronic mail |
2 | Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. | 2 | Copyright (C) 2003 Free Software Foundation, Inc. |
3 | 3 | ||
4 | This library is free software; you can redistribute it and/or | 4 | This library is free software; you can redistribute it and/or |
5 | modify it under the terms of the GNU Lesser General Public | 5 | modify it under the terms of the GNU Lesser General Public |
... | @@ -42,6 +42,8 @@ mu_pop3_pass (mu_pop3_t pop3, const char *passwd) | ... | @@ -42,6 +42,8 @@ mu_pop3_pass (mu_pop3_t pop3, const char *passwd) |
42 | case MU_POP3_PASS: | 42 | case MU_POP3_PASS: |
43 | status = mu_pop3_send (pop3); | 43 | status = mu_pop3_send (pop3); |
44 | MU_POP3_CHECK_EAGAIN (pop3, status); | 44 | MU_POP3_CHECK_EAGAIN (pop3, status); |
45 | /* Obscure the passwd. */ | ||
46 | memset (pop3->io.buf, '\0', pop3->io.len); | ||
45 | pop3->acknowledge = 0; | 47 | pop3->acknowledge = 0; |
46 | pop3->state = MU_POP3_PASS_ACK; | 48 | pop3->state = MU_POP3_PASS_ACK; |
47 | 49 | ... | ... |
-
Please register or sign in to post a comment