wmbiff: Allow usernames with more than 32 characters.
Patch by Tommaso Parisi <tommasop.ml@libero.it>. For more information, see: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=626393
This commit is contained in:
parent
1981a52fdf
commit
eeacc3014a
|
@ -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;
|
||||
|
|
|
@ -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]+)?( *(.*))?$";
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue