From: Oliver Dumschat Date: Fri, 5 Aug 2011 03:14:37 +0000 (-0600) Subject: Bug 2655: passing wrong the username to the url_rewrite_program X-Git-Tag: SQUID_3_1_15~24 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=23f97d4601be735823bb1353dd5e3bbd56f798ee;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 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")); }