From 23f97d4601be735823bb1353dd5e3bbd56f798ee Mon Sep 17 00:00:00 2001 From: Oliver Dumschat Date: Thu, 4 Aug 2011 21:14:37 -0600 Subject: [PATCH] Bug 2655: passing wrong the username to the url_rewrite_program --- src/redirect.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/redirect.cc b/src/redirect.cc index a66e0ebb47..2227fa180c 100644 --- a/src/redirect.cc +++ b/src/redirect.cc @@ -146,7 +146,8 @@ redirectStart(ClientHttpRequest * http, RH * handler, void *data) debugs(61, 5, HERE << "auth-user=" << (r->client_ident?r->client_ident:"NULL")); } - if (!r->client_ident && http->request->extacl_user.defined()) { + // HttpRequest initializes with null_string. So we must check both defined() and size() + if (!r->client_ident && http->request->extacl_user.defined() && http->request->extacl_user.size()) { r->client_ident = http->request->extacl_user.termedBuf(); debugs(61, 5, HERE << "acl-user=" << (r->client_ident?r->client_ident:"NULL")); } -- 2.47.2