[squid-users] Escape/Unescape of helper input/output question

From: Markus Moeller <huaraz_at_moeller.plus.com>
Date: Mon, 23 Dec 2013 17:59:29 -0000

Hi Amos,

  Which helper has to do which rfc1738_(un)escape ? I am running the
negotiate wrapper with NTLM and Kerberos. When I authenticate with NTLM I
see the following in the log

2013/12/23 17:45:48| negotiate_wrapper: received type 3 NTLM token
2013/12/23 17:45:48| negotiate_wrapper: Return 'AF = WIN2003R2\mm
'

But my external helper does not get the \. Does the wrapper need to escape
the return value ( I would have thought the wrapper just forwards waht is
gets from the real auth helper) ?

kerberos_ldap_group.cc(329): pid=16122 :2013/12/23 17:45:58|
kerberos_ldap_group: MM: Got User: WIN2003R2mm
kerberos_ldap_group.cc(331): pid=16122 :2013/12/23 17:45:58|
kerberos_ldap_group: MM: Got unescaped User: WIN2003R2mm

I added my debug around line 330 of
helpers/external_acl/kerberos_ldap_group/kerberos_ldap_group.cc

        user = strtok(buf, " \n");
        if (!user) {
            debug((char *) "%s| %s: INFO: No Username given\n", LogTime(),
PROGRAM);
            SEND_ERR("Invalid request. No Username");
            continue;
        }
debug((char *) "%s| %s: MM: Got User: %s\n", LogTime(), PROGRAM, user);
        rfc1738_unescape(user);
debug((char *) "%s| %s: MM: Got unescaped User: %s\n", LogTime(), PROGRAM,
user);

This is with

2013/12/23 17:45:29 kid1| Starting Squid Cache version 3.4.1-BZR for
x86_64-suse-linux-gnu...

Thank you
Markus
Received on Mon Dec 23 2013 - 17:59:49 MST

This archive was generated by hypermail 2.2.0 : Tue Dec 24 2013 - 12:00:05 MST