From eeacc3014aaa5e2fd5c70cedb4f8ad60b0006f06 Mon Sep 17 00:00:00 2001 From: Doug Torrance Date: Fri, 7 Nov 2014 21:31:18 -0600 Subject: [PATCH] wmbiff: Allow usernames with more than 32 characters. Patch by Tommaso Parisi . For more information, see: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=626393 --- wmbiff/wmbiff/Client.h | 2 +- wmbiff/wmbiff/Imap4Client.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/wmbiff/wmbiff/Client.h b/wmbiff/wmbiff/Client.h index 578f168..b3a048c 100644 --- a/wmbiff/wmbiff/Client.h +++ b/wmbiff/wmbiff/Client.h @@ -76,7 +76,7 @@ typedef struct _mbox_t { } maildir; struct { char password[BUF_SMALL]; - char userName[BUF_SMALL]; + char userName[BUF_BIG]; char serverName[BUF_BIG]; int serverPort; int localPort; diff --git a/wmbiff/wmbiff/Imap4Client.c b/wmbiff/wmbiff/Imap4Client.c index 0555f86..1e405e5 100644 --- a/wmbiff/wmbiff/Imap4Client.c +++ b/wmbiff/wmbiff/Imap4Client.c @@ -479,8 +479,8 @@ int imap4Create( /*@notnull@ */ Pop3 pc, const char *const str) /* special characters aren't allowed in hostnames, rfc 1034 */ const char *regexes[] = { // type : username : password @ hostname (/ name)?(:port)? - ".*imaps?:([^: ]{1,32}):([^@]{0,32})@([A-Za-z1-9][-A-Za-z0-9_.]+)(/(\"[^\"]+\")|([^:@ ]+))?(:[0-9]+)?( *([CcAaPp][-A-Za-z5 ]*))?$", - ".*imaps?:([^: ]{1,32}) ([^ ]{1,32}) ([A-Za-z1-9][-A-Za-z0-9_.]+)(/(\"[^\"]+\")|([^: ]+))?( [0-9]+)?( *([CcAaPp][-A-Za-z5 ]*))?$", + ".*imaps?:([^: ]{1,256}):([^@]{0,32})@([A-Za-z1-9][-A-Za-z0-9_.]+)(/(\"[^\"]+\")|([^:@ ]+))?(:[0-9]+)?( *([CcAaPp][-A-Za-z5 ]*))?$", + ".*imaps?:([^: ]{1,256}) ([^ ]{1,32}) ([A-Za-z1-9][-A-Za-z0-9_.]+)(/(\"[^\"]+\")|([^: ]+))?( [0-9]+)?( *([CcAaPp][-A-Za-z5 ]*))?$", NULL }; char *unaliased_str; @@ -497,9 +497,9 @@ int imap4Create( /*@notnull@ */ Pop3 pc, const char *const str) if (Relax) { regexes[0] = - ".*imaps?:([^: ]{1,32}):([^@]{0,32})@([^/: ]+)(/(\"[^\"]+\")|([^:@ ]+))?(:[0-9]+)?( *(.*))?$"; + ".*imaps?:([^: ]{1,256}):([^@]{0,32})@([^/: ]+)(/(\"[^\"]+\")|([^:@ ]+))?(:[0-9]+)?( *(.*))?$"; regexes[1] = - ".*imaps?:([^: ]{1,32}) ([^ ]{1,32}) ([^/: ]+)(/(\"[^\"]+\")|([^: ]+))?( [0-9]+)?( *(.*))?$"; + ".*imaps?:([^: ]{1,256}) ([^ ]{1,32}) ([^/: ]+)(/(\"[^\"]+\")|([^: ]+))?( [0-9]+)?( *(.*))?$"; }