dovecot-1.2: auth: Removed extra string escaping from places whe...

dovecot at dovecot.org dovecot at dovecot.org
Thu Jan 8 00:33:30 EET 2009


details:   http://hg.dovecot.org/dovecot-1.2/rev/9f885dbd8157
changeset: 8597:9f885dbd8157
user:      Timo Sirainen <tss at iki.fi>
date:      Wed Jan 07 17:03:34 2009 -0500
description:
auth: Removed extra string escaping from places where it's not necessary (or is even harmful).

diffstat:

2 files changed, 4 insertions(+), 8 deletions(-)
src/auth/auth-cache.c   |    9 +++------
src/auth/auth-request.c |    3 +--

diffs (46 lines):

diff -r 2609eca99495 -r 9f885dbd8157 src/auth/auth-cache.c
--- a/src/auth/auth-cache.c	Wed Jan 07 13:45:37 2009 -0500
+++ b/src/auth/auth-cache.c	Wed Jan 07 17:03:34 2009 -0500
@@ -166,8 +166,7 @@ auth_cache_lookup(struct auth_cache *cac
 	str = t_str_new(256);
 	var_expand(str, t_strconcat(request->userdb_lookup ? "U" : "P",
 				    "%!/", key, NULL),
-		   auth_request_get_var_expand_table(request,
-						     auth_request_str_escape));
+		   auth_request_get_var_expand_table(request, NULL));
 
 	node = hash_table_lookup(cache->hash, str_c(str));
 	if (node == NULL) {
@@ -220,8 +219,7 @@ void auth_cache_insert(struct auth_cache
 	str = t_str_new(256);
 	var_expand(str, t_strconcat(request->userdb_lookup ? "U" : "P",
 				    "%!/", key, NULL),
-		   auth_request_get_var_expand_table(request,
-						     auth_request_str_escape));
+		   auth_request_get_var_expand_table(request, NULL));
 
 	request->user = current_username;
 
@@ -262,8 +260,7 @@ void auth_cache_remove(struct auth_cache
 
 	str = t_str_new(256);
 	var_expand(str, key,
-		   auth_request_get_var_expand_table(request,
-		   				     auth_request_str_escape));
+		   auth_request_get_var_expand_table(request, NULL));
 
 	node = hash_table_lookup(cache->hash, str_c(str));
 	if (node == NULL)
diff -r 2609eca99495 -r 9f885dbd8157 src/auth/auth-request.c
--- a/src/auth/auth-request.c	Wed Jan 07 13:45:37 2009 -0500
+++ b/src/auth/auth-request.c	Wed Jan 07 17:03:34 2009 -0500
@@ -803,8 +803,7 @@ auth_request_fix_username(struct auth_re
 		request->user = user;
 
 		dest = t_str_new(256);
-		table = auth_request_get_var_expand_table(request,
-						auth_request_str_escape);
+		table = auth_request_get_var_expand_table(request, NULL);
 		var_expand(dest, request->auth->username_format, table);
 		user = p_strdup(request->pool, str_c(dest));
 


More information about the dovecot-cvs mailing list