In addition to that they have a new look (background-color, font)
and are valid according to the HTML standards at www.w3.org.
(Clemens Löser)
+ - Login and password send to Basic auth helpers is now URL escaped
+ to allow for spaces and other "odd" characters in logins and
+ passwords
Changes to Squid-2.4.STABLE7 (July 2, 2002):
#
# Makefile for the Squid LDAP authentication helper
#
-# $Id: Makefile.am,v 1.3 2002/01/08 16:24:15 hno Exp $
+# $Id: Makefile.am,v 1.4 2002/08/12 01:11:48 hno Exp $
#
# Uncomment and customize the following to suit your needs:
#
EXTRA_DIST = squid_ldap_auth.8
squid_ldap_auth_SOURCES = squid_ldap_auth.c
-LDADD = -lldap -llber
+LDADD = -L$(top_builddir)/lib -lmiscutil -lldap -llber $(XTRA_LIBS)
+INCLUDES = -I$(top_srcdir)/include
#include <lber.h>
#include <ldap.h>
+#include "util.h"
+
/* Change this to your search base */
static char *basedn;
static char *searchfilter = NULL;
printf("ERR\n");
continue;
}
+ rfc1738_unescape(user);
+ rfc1738_unescape(passwd);
tryagain = 1;
recover:
if (ld == NULL) {
#
# Makefile for the Squid Object Cache server
#
-# $Id: Makefile.am,v 1.8 2002/06/26 18:44:27 hno Exp $
+# $Id: Makefile.am,v 1.9 2002/08/12 01:11:48 hno Exp $
#
# Uncomment and customize the following to suit your needs:
#
sysconf_DATA = \
msntauth.conf.default
-LDADD = @XTRA_LIBS@
+LDADD = -L$(top_builddir)/lib -lmiscutil $(XTRA_LIBS)
-INCLUDES = -I. -I$(top_builddir)/include -I$(top_srcdir)/include \
- -I$(top_srcdir)/src/
+INCLUDES = -I$(top_srcdir)/include
confload.o: confload.c
$(COMPILE) -DSYSCONFDIR=\"$(sysconfdir)\" -c $(srcdir)/confload.c -o $@
}
Checktimer(); /* Check if the user lists have changed */
+ rfc1738_unescape(username);
+ rfc1738_unescape(password);
+
/*
* Check if user is explicitly denied or allowed.
* If user passes both checks, they can be authenticated.
#
# Makefile for the Squid Object Cache server
#
-# $Id: Makefile.am,v 1.1 2001/08/31 11:19:16 robertc Exp $
+# $Id: Makefile.am,v 1.2 2002/08/12 01:11:49 hno Exp $
#
# Uncomment and customize the following to suit your needs:
#
libexec_PROGRAMS = ncsa_auth
ncsa_auth_SOURCES = ncsa_auth.c
LDADD = -L$(top_builddir)/lib -lmiscutil $(CRYPTLIB) $(XTRA_LIBS)
-INCLUDES = -I. -I$(top_builddir)/include -I$(top_srcdir)/include \
- -I$(top_srcdir)/src/
+INCLUDES = -I$(top_srcdir)/include
printf("ERR\n");
continue;
}
+ rfc1738_unescape(user);
+ rfc1738_unescape(passwd);
u = hash_lookup(hash, user);
if (u == NULL) {
printf("ERR\n");
#
# Makefile for the Squid PAM authentication helper
#
-# $Id: Makefile.am,v 1.3 2002/01/08 16:24:21 hno Exp $
+# $Id: Makefile.am,v 1.4 2002/08/12 01:11:50 hno Exp $
#
# Uncomment and customize the following to suit your needs:
#
-INCLUDES = -I. -I$(top_builddir)/include -I$(top_srcdir)/include \
- -I$(top_srcdir)/src/
+INCLUDES = -I$(top_srcdir)/include
man_MANS = pam_auth.8
EXTRA_DIST = pam_auth.8
libexec_PROGRAMS = pam_auth
-LDADD = -lpam $(XTRA_LIBS)
+LDADD = -L$(top_builddir)/lib -lmiscutil -lpam $(XTRA_LIBS)
/*
- * $Id: pam_auth.c,v 1.7 2002/01/07 03:29:10 hno Exp $
+ * $Id: pam_auth.c,v 1.8 2002/08/12 01:11:50 hno Exp $
*
* PAM authenticator module for Squid.
* Copyright (C) 1999,2002 Henrik Nordstrom <hno@squid-cache.org>
goto error;
}
*password++ = '\0';
+ rfc1738_unescape(user);
+ rfc1738_unescape(password);
conv.appdata_ptr = (char *) password; /* from buf above. not allocated */
if (ttl == 0) {
#
# Makefile for the Squid SASL authentication helper
#
-# $Id: Makefile.am,v 1.2 2002/04/14 22:24:03 hno Exp $
+# $Id: Makefile.am,v 1.3 2002/08/12 01:11:51 hno Exp $
#
# Uncomment and customize the following to suit your needs:
#
-INCLUDES = -I. -I$(top_builddir)/include -I$(top_srcdir)/include \
- -I$(top_srcdir)/src/
+INCLUDES = -I$(top_srcdir)/include
libexec_PROGRAMS = sasl_auth
-LDADD = -lsasl $(XTRA_LIBS)
+LDADD = -L$(top_builddir)/lib -lmiscutil -lsasl $(XTRA_LIBS)
EXTRA_DIST = squid_sasl_auth squid_sasl_auth.conf
/*
- * $Id: sasl_auth.c,v 1.2 2002/04/01 09:08:38 hno Exp $
+ * $Id: sasl_auth.c,v 1.3 2002/08/12 01:11:51 hno Exp $
*
* SASL authenticator module for Squid.
* Copyright (C) 2002 Ian Castle <ian.castle@coldcomfortfarm.net>
}
*password++ = '\0';
+ rfc1738_unescape(username);
+ rfc1738_unescape(password);
+
rc = sasl_checkpass(conn, username, strlen(username), password, strlen(password), &errstr);
if ( rc != SASL_OK ) {
#
# Makefile for the Squid Object Cache server
#
-# $Id: Makefile.am,v 1.3 2002/05/20 02:03:56 hno Exp $
+# $Id: Makefile.am,v 1.4 2002/08/12 01:11:55 hno Exp $
#
# Uncomment and customize the following to suit your needs:
#
smb_auth_CFLAGS = -DSAMBAPREFIX=\"$(SAMBAPREFIX)\" -DHELPERSCRIPT=\"$(SMB_AUTH_HELPER_PATH)\"
EXTRA_DIST = smb_auth.sh COPYING-2.0
-LDADD = $(XTRA_LIBS)
+LDADD = -L$(top_builddir)/lib -lmiscutil $(XTRA_LIBS)
-INCLUDES = -I. -I$(top_builddir)/include -I$(top_srcdir)/include \
- -I$(top_srcdir)/src/
+INCLUDES = -I$(top_srcdir)/include
#include <stdlib.h>
#include <string.h>
+#include "util.h"
+
#define BUFSIZE 256
#define NMB_UNICAST 1
#define NMB_BROADCAST 2
(void) printf("ERR\n");
continue;
}
+ rfc1738_unescape(user);
+ rfc1738_unescape(pass);
(void) fprintf(p, "%s\n", dom->name);
(void) fprintf(p, "%s\n", dom->passthrough);
(void) fprintf(p, "%s\n", dom->nmbaddr);
#
# Makefile for the Squid Object Cache server
#
-# $Id: Makefile.am,v 1.3 2001/12/27 00:23:33 hno Exp $
+# $Id: Makefile.am,v 1.4 2002/08/12 01:11:55 hno Exp $
#
#
libexec_PROGRAMS = yp_auth
yp_auth_SOURCES = yp_auth.c nis_support.h nis_support.c
LDADD = -L$(top_builddir)/lib -lmiscutil $(CRYPTLIB) $(XTRA_LIBS)
-INCLUDES = -I. -I$(top_builddir)/include -I$(top_srcdir)/include \
- -I$(top_srcdir)/src/
+INCLUDES = -I$(top_srcdir)/include
printf("ERR\n");
continue;
}
+
+ rfc1738_unescape(user);
+ rfc1738_unescape(passwd);
+
nispasswd = get_nis_password(user, nisdomain, nismap);
if (!nispasswd) {
#
# Makefile for the Squid Object Cache server
#
-# $Id: Makefile.am,v 1.1 2001/08/31 11:19:20 robertc Exp $
+# $Id: Makefile.am,v 1.2 2002/08/12 01:11:56 hno Exp $
#
# Uncomment and customize the following to suit your needs:
#
getpwname_auth_SOURCES = getpwnam_auth.c
-INCLUDES = -I. -I$(top_builddir)/include -I$(top_srcdir)/include \
- -I$(top_srcdir)/src/
-
+INCLUDES = -I$(top_srcdir)/include
LDADD = -L$(top_builddir)/lib -lmiscutil $(CRYPTLIB) $(XTRA_LIBS)
#include <pwd.h>
#endif
+#include "util.h"
#define ERR "ERR\n"
#define OK "OK\n"
printf(ERR);
continue;
}
+ rfc1738_unescape(user);
+ rfc1738_unescape(passwd);
pwd = getpwnam(user);
if (pwd == NULL) {
printf(ERR);
#!/usr/bin/perl
-# $Id: smb_auth.pl,v 1.2 2001/05/21 04:50:58 hno Exp $
+# $Id: smb_auth.pl,v 1.3 2002/08/12 01:11:57 hno Exp $
#if you define this, debugging output will be printed to STDERR.
#$debug=1;
$|=1;
while (<>) {
- if (! m;([^\\]+)(\\|/)(\S+)\s(.*); ) { #parse the line
+ if (! m;([^\\]+)(\\|/|%2f|%5c)(\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;
+ $user =~ s/%([0-9a-f][0-9a-f])/pack("H2",$1)/gie;
+ $pass =~ s/%([0-9a-f][0-9a-f])/pack("H2",$1)/gie;
print STDERR "domain: $domain, user: $user, pass=$pass\n"
if (defined ($debug));
# check out that we know the PDC address
#
# Makefile for the Squid Object Cache server
#
-# $Id: Makefile.am,v 1.4 2002/05/23 14:01:19 hno Exp $
+# $Id: Makefile.am,v 1.5 2002/08/12 01:11:57 hno Exp $
#
libexec_PROGRAMS = wb_auth
wb_auth_SOURCES = wb_basic_auth.c wb_common.c samba_nss.h winbindd_nss.h wbntlm.h winbind_nss_config.h
-INCLUDES = -I. -I$(top_builddir)/include -I$(top_srcdir)/include \
- -I$(top_srcdir)/src
+INCLUDES = -I$(top_srcdir)/include
LDADD = -L$(top_builddir)/lib -lmiscutil -lntlmauth $(XTRA_LIBS)
*pass='\0';
pass++;
+ rfc1738_unescape(user);
+ rfc1738_unescape(pass);
+
do_authenticate(user,pass);
}
/*
- * $Id: auth_basic.cc,v 1.17 2002/04/13 23:07:53 hno Exp $
+ * $Id: auth_basic.cc,v 1.18 2002/08/12 01:11:58 hno Exp $
*
* DEBUG: section 29 Authenticator
* AUTHOR: Duane Wessels
{
authenticateStateData *r = NULL;
char buf[8192];
+ char user[1024], pass[1024];
basic_data *basic_auth;
assert(auth_user_request);
assert(handler);
r->auth_user_request = auth_user_request;
/* mark the user as haveing verification in progress */
basic_auth->flags.credentials_ok = 2;
- snprintf(buf, 8192, "%s %s\n", basic_auth->username, basic_auth->passwd);
+ xstrncpy(user, rfc1738_escape(basic_auth->username), sizeof(user));
+ xstrncpy(pass, rfc1738_escape(basic_auth->passwd), sizeof(pass));
+ snprintf(buf, sizeof(buf), "%s %s\n", user, pass);
helperSubmit(basicauthenticators, buf, authenticateBasicHandleReply, r);
}
}