[Pkg-wmaker-commits] [wmbiff] 01/04: Alternate regex for imap/imaps which allows "@" in passwords. Fix to correctly handle the auth list in imap. Patch from David Smith <davidsmith at acm.org>.
Doug Torrance
dtorrance-guest at moszumanska.debian.org
Thu Aug 20 03:00:20 UTC 2015
This is an automated email from the git hooks/post-receive script.
dtorrance-guest pushed a commit to tag wmbiff_0_3_6
in repository wmbiff.
commit 79246668b2434c3d0a140dd7ef051c745c7f9bf5
Author: jordi <jordi>
Date: Sun Jan 27 12:46:38 2002 +0000
Alternate regex for imap/imaps which allows "@" in passwords.
Fix to correctly handle the auth list in imap.
Patch from David Smith <davidsmith at acm.org>.
---
NEWS | 8 +++++++-
README | 1 +
wmbiff/Imap4Client.c | 21 +++++++++++++++++----
wmbiff/Makefile | 4 ++--
wmbiff/wmbiffrc.5 | 12 +++++++++---
5 files changed, 36 insertions(+), 10 deletions(-)
diff --git a/NEWS b/NEWS
index d64b1ac..698d717 100644
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,12 @@
Release Notes
~~~~~~~~~~~~~
+Release 0.3.6 - [UNRELEASED]
+
+ * Added a new syntax for IMAP, which allows using a "@" in
+ the password field. See wmbiffrc(5) for details.
+ * Fix for a correct usage of the auth list in IMAP.
+
Release 0.3.5 - Mon, 14 Jan 2002 02:43:23 +0100
* Added support for GNUtls 0.3. You can still compile wmbiff using
@@ -258,4 +264,4 @@ Release 0.1 - Wed, 17 Nov 1999 00:00:00 +0000
* Initial release by Gennady Belyakov <gb at ccat.elect.ru>.
-$Id: NEWS,v 1.11 2002/01/14 01:51:14 jordi Exp $
+$Id: NEWS,v 1.12 2002/01/27 12:46:38 jordi Exp $
diff --git a/README b/README
index e04a998..6f77f15 100644
--- a/README
+++ b/README
@@ -89,6 +89,7 @@ position. All other positions will be empty.
Neil Spring (nspring at cs.washington.edu)
NAKAYAMA Takao (hoehoe at wakaba.jp)
Jay T Francis (jtf at u880.org)
+ David Smith (davidsmith at acm.org)
_________________________________________________________________
diff --git a/wmbiff/Imap4Client.c b/wmbiff/Imap4Client.c
index f85ec96..6c61f85 100644
--- a/wmbiff/Imap4Client.c
+++ b/wmbiff/Imap4Client.c
@@ -294,8 +294,12 @@ int imap_checkmail(Pop3 pc)
int imap4Create(Pop3 pc, const char *const str)
{
struct re_registers regs;
- const char *regex =
- ".*imaps?:([^:]{1,32}):([^@]{1,32})@([^/: ]+)(/[^: ]+)?(:[0-9]+)? *";
+ int i, matchedchars;
+ const char *regexes[] = {
+ ".*imaps?:([^: ]{1,32}):([^@]{1,32})@([^/: ]+)(/[^: ]+)?(:[0-9]+)? (.+)? *",
+ ".*imaps?:([^: ]{1,32}) ([^ ]{1,32}) ([^/: ]+)(/[^: ]+)?( [0-9]+)? (.+)? *",
+ NULL
+ };
/* IMAP4 format: imap:user:password at server/mailbox[:port] */
/* If 'str' line is badly formatted, wmbiff won't display the mailbox. */
@@ -320,9 +324,18 @@ int imap4Create(Pop3 pc, const char *const str)
} else
PCU.dossl = 0;
- if (compile_and_match_regex(regex, str, ®s) <= 0) {
+ for (matchedchars = 0, i = 0;
+ regexes[i] != NULL && matchedchars <= 0; i++)
+ {
+ matchedchars = compile_and_match_regex(regexes[i], str, ®s);
+ }
+
+ /* failed to match either regex */
+ if (matchedchars <= 0)
+ {
pc->label[0] = '\0';
- fprintf(stderr, "Couldn't parse line %s\n", str);
+ fprintf(stderr, "Couldn't parse line %s (%d)\n", str,
+ matchedchars);
return -1;
}
diff --git a/wmbiff/Makefile b/wmbiff/Makefile
index 2614d5b..d8c33ff 100644
--- a/wmbiff/Makefile
+++ b/wmbiff/Makefile
@@ -1,6 +1,6 @@
-# $Id: Makefile,v 1.18 2002/01/14 01:50:16 jordi Exp $
+# $Id: Makefile,v 1.19 2002/01/27 12:46:38 jordi Exp $
-WMBIFF_VERSION = "0.3.5"
+WMBIFF_VERSION = "0.3.5-cvs"
DESTDIR=
prefix=/usr/local
diff --git a/wmbiff/wmbiffrc.5 b/wmbiff/wmbiffrc.5
index 2ce9074..318122d 100644
--- a/wmbiff/wmbiffrc.5
+++ b/wmbiff/wmbiffrc.5
@@ -1,12 +1,12 @@
.\" Hey, Emacs! This is an -*- nroff -*- source file.
-.\" $Id: wmbiffrc.5,v 1.7 2001/11/16 00:39:13 bluehal Exp $
+.\" $Id: wmbiffrc.5,v 1.8 2002/01/27 12:46:38 jordi Exp $
.\"
-.\" wmbiff.1 and wmbiffrc.5 are copyright 1999-2001 by
+.\" wmbiff.1 and wmbiffrc.5 are copyright 1999-2002 by
.\" Jordi Mallach <jordi at debian.org>
.\"
.\" This is free documentation, see the latest version of the GNU
.\" General Public License for copying conditions. There is NO warranty.
-.TH WMBIFFRC 5 "October 4, 2001" "wmbiff"
+.TH WMBIFFRC 5 "January 27, 2002" "wmbiff"
.SH NAME
wmbiffrc \- configuration file for
@@ -80,6 +80,9 @@ See Authentication below for a description of the auth field.
.RS
imap:user:passwd at server[/mailbox][:port] [auth]
.RE
+.RS
+imap:user passwd server[/mailbox][ port] [auth]
+.RE
.TP
.I imaps
These are IMAP4 boxes wrapped in a TLS (SSL) connection, only available if
@@ -92,6 +95,9 @@ are not yet checked, it is vulnerable to man-in-the-middle attack.
.RS
imaps:user:passwd at server[/mailbox][:port] [auth]
.RE
+.RS
+imaps:user passwd server[/mailbox][ port] [auth]
+.RE
.TP
.I licq
With this box type, wmbiff will read the given history file and track the
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmbiff.git
More information about the Pkg-wmaker-commits
mailing list