From 2290efa0e0e414f83e19f27a70a8fc40c7836c55 Mon Sep 17 00:00:00 2001 From: Oliver Dumschat Date: Thu, 28 Jul 2011 23:53:35 -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 6b827ef532..05d36f4061 100644 --- a/src/redirect.cc +++ b/src/redirect.cc @@ -154,7 +154,8 @@ redirectStart(ClientHttpRequest * http, RH * handler, void *data) } #endif - 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.3