]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug #587, #558: smb_auth fails on domain qualified logins
authorhno <>
Sat, 17 May 2003 23:13:05 +0000 (23:13 +0000)
committerhno <>
Sat, 17 May 2003 23:13:05 +0000 (23:13 +0000)
helpers/basic_auth/multi-domain-NTLM/smb_auth.pl

index 71898facf566f994c77c62ea6fb756ffc214d91e..d9cb933359117317a84585c77472215583ce6755 100644 (file)
@@ -1,5 +1,5 @@
 #!/usr/bin/perl
-# $Id: smb_auth.pl,v 1.4 2003/01/23 00:35:50 robertc Exp $
+# $Id: smb_auth.pl,v 1.5 2003/05/17 17:13:05 hno Exp $
 
 #if you define this, debugging output will be printed to STDERR.
 #$debug=1;
@@ -38,11 +38,12 @@ use Authen::Smb;
 
 $|=1;
 while (<>) {
-       if (! m;([^\\]+)(\\|/|%2f|%5c)(\S+)\s(.*); ) { #parse the line
+       chomp;
+       if (! m;^(\S+)(/|%5c)(\S+)\s(\S+)$; ) { #parse the line
                print "ERR\n";
                next;
        }
-        $domain=$1;
+       $domain=$1;
        $user=$3;
        $pass=$4;
        $domain =~ s/%([0-9a-f][0-9a-f])/pack("H2",$1)/gie;