From: Oliver Dumschat Date: Fri, 29 Jul 2011 05:53:35 +0000 (-0600) Subject: Bug 2655: passing wrong the username to the url_rewrite_program X-Git-Tag: take08~55^2~25 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2290efa0e0e414f83e19f27a70a8fc40c7836c55;p=thirdparty%2Fsquid.git Bug 2655: passing wrong the username to the url_rewrite_program --- 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")); }