dovecot-2.0: doveadm: Detect '?' also as wildcard character in u...

dovecot at dovecot.org dovecot at dovecot.org
Fri May 28 18:44:16 EEST 2010


details:   http://hg.dovecot.org/dovecot-2.0/rev/e7b0366f9cfb
changeset: 11422:e7b0366f9cfb
user:      Timo Sirainen <tss at iki.fi>
date:      Fri May 28 16:44:14 2010 +0100
description:
doveadm: Detect '?' also as wildcard character in usernames.

diffstat:

 src/doveadm/doveadm-auth.c |  3 ++-
 src/doveadm/doveadm-mail.c |  3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r cfa4a9dcb832 -r e7b0366f9cfb src/doveadm/doveadm-auth.c
--- a/src/doveadm/doveadm-auth.c	Fri May 28 16:26:30 2010 +0100
+++ b/src/doveadm/doveadm-auth.c	Fri May 28 16:44:14 2010 +0100
@@ -229,7 +229,8 @@
 
 	have_wildcards = FALSE;
 	for (i = optind; argv[i] != NULL; i++) {
-		if (strchr(argv[i], '*') != NULL) {
+		if (strchr(argv[i], '*') != NULL ||
+		    strchr(argv[i], '?') != NULL) {
 			have_wildcards = TRUE;
 			break;
 		}
diff -r cfa4a9dcb832 -r e7b0366f9cfb src/doveadm/doveadm-mail.c
--- a/src/doveadm/doveadm-mail.c	Fri May 28 16:26:30 2010 +0100
+++ b/src/doveadm/doveadm-mail.c	Fri May 28 16:44:14 2010 +0100
@@ -359,7 +359,8 @@
 			service_flags |=
 				MAIL_STORAGE_SERVICE_FLAG_USERDB_LOOKUP;
 			username = optarg;
-			if (strchr(username, '*') != NULL)
+			if (strchr(username, '*') != NULL ||
+			    strchr(username, '?') != NULL)
 				wildcard_user = username;
 			break;
 		default:


More information about the dovecot-cvs mailing list