[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [tpop3d-discuss] problem with password containing spaces
From: |
Chris Lightfoot |
Subject: |
Re: [tpop3d-discuss] problem with password containing spaces |
Date: |
Mon, 29 Apr 2002 18:27:04 +0100 |
User-agent: |
Mutt/1.3.24i |
On Mon, Apr 29, 2002 at 07:12:20PM +0200, Tadas Þelionis wrote:
> it makes sense to do so.
> currently i'm considering to go back to gnupopd+vmail, which is far from
> perfect too, or to patch tpop3d by myself, but it would take less time to
> do so for you i guess...
OK, try this (against 1.4.1):
diff -u -r1.31 connection.c
--- connection.c 2002/03/18 23:47:33 1.31
+++ connection.c 2002/04/29 17:26:04
@@ -248,9 +248,31 @@
* Create a new pop3command object. */
pop3command pop3command_new(const char *s) {
pop3command p;
+ const char *q;
int i;
- p = xcalloc(1, sizeof *p);
+ p = xcalloc(sizeof *p, 1);
+
+ /* Ugly. PASS is a special case, because we permit a password to contain
+ * spaces. */
+ q = s + strspn(s, " \t");
+ if (strncasecmp(q, "PASS ", 5) == 0) {
+ /* Manual parsing. */
+ p->cmd = PASS;
+ p->toks = xcalloc(sizeof *p->toks, 1);
+
+ p->toks->str = xstrdup(q);
+ chomp(p->toks->str);
+ p->toks->str[4] = 0;
+
+ p->toks->toks = xcalloc(sizeof(char*), 2);
+ p->toks->toks[0] = p->toks->str;
+ p->toks->toks[1] = p->toks->str + 5;
+
+ p->toks->num = 2;
+
+ return p;
+ }
p->cmd = UNKNOWN;
p->toks = tokens_new(s, " \t");
--
``That Ariel Sharon. Boy, he sure is controversial.
Most Western countries would have to have a military coup
before they enjoyed a leader of that caliber.'' (Sydney Webb)
- [tpop3d-discuss] problem with password containing spaces, Tadas Želionis, 2002/04/29
- Re: [tpop3d-discuss] problem with password containing spaces, Chris Lightfoot, 2002/04/29
- Re: [tpop3d-discuss] problem with password containing spaces, Tadas Želionis, 2002/04/29
- Re: [tpop3d-discuss] problem with password containing spaces,
Chris Lightfoot <=
- Re: [tpop3d-discuss] problem with password containing spaces, Tadas Želionis, 2002/04/29
- Re: [tpop3d-discuss] problem with password containing spaces, Chris Lightfoot, 2002/04/29
- Re: [tpop3d-discuss] problem with password containing spaces, Tadas Želionis, 2002/04/29
- Re: [tpop3d-discuss] problem with password containing spaces, Chris Lightfoot, 2002/04/29
- Re: [tpop3d-discuss] problem with password containing spaces, Tadas Ūelionis, 2002/04/29
- Re: [tpop3d-discuss] problem with password containing spaces, Chris Lightfoot, 2002/04/29