dovecot: Fixed proxy_maybe handling.
dovecot at dovecot.org
dovecot at dovecot.org
Thu Feb 21 15:56:20 EET 2008
details: http://hg.dovecot.org/dovecot/rev/ab9c6952cc49
changeset: 7275:ab9c6952cc49
user: Timo Sirainen <tss at iki.fi>
date: Thu Feb 21 15:57:45 2008 +0200
description:
Fixed proxy_maybe handling.
diffstat:
1 file changed, 11 insertions(+), 7 deletions(-)
src/auth/auth-request.c | 18 +++++++++++-------
diffs (40 lines):
diff -r 14335cfd2fd2 -r ab9c6952cc49 src/auth/auth-request.c
--- a/src/auth/auth-request.c Thu Feb 21 15:40:10 2008 +0200
+++ b/src/auth/auth-request.c Thu Feb 21 15:57:45 2008 +0200
@@ -985,7 +985,6 @@ static void auth_request_set_reply_field
ourself */
request->proxy = TRUE;
request->proxy_maybe = TRUE;
- name = "proxy";
value = NULL;
}
@@ -1261,17 +1260,22 @@ void auth_request_proxy_finish(struct au
if (!success) {
/* drop all proxy fields */
+ } else if (!request->proxy_maybe) {
+ /* proxying */
+ request->no_login = TRUE;
+ return;
+ } else if (!auth_request_proxy_is_self(request)) {
+ /* proxy destination isn't ourself - proxy */
+ auth_stream_reply_remove(request->extra_fields, "proxy_maybe");
+ auth_stream_reply_add(request->extra_fields, "proxy", NULL);
+ request->no_login = TRUE;
+ return;
} else {
- if (!request->proxy_maybe ||
- !auth_request_proxy_is_self(request)) {
- request->no_login = TRUE;
- return;
- }
-
/* proxying to ourself - log in without proxying by dropping
all the proxying fields. */
}
auth_stream_reply_remove(request->extra_fields, "proxy");
+ auth_stream_reply_remove(request->extra_fields, "proxy_maybe");
auth_stream_reply_remove(request->extra_fields, "host");
auth_stream_reply_remove(request->extra_fields, "port");
auth_stream_reply_remove(request->extra_fields, "destuser");
More information about the dovecot-cvs
mailing list