Re: non anonymous FTP-Problem

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Thu, 06 Mar 1997 23:53:25 +0100

I think this needs some more thought. The login in the authentication
should be compared with the login i URL, and the authentication header
should be ignored if not identical.

Duane Wessels wrote:
> =

> Enno.Hofmann@FernUni-Hagen.de writes:
> =

> >-----BEGIN PGP SIGNED MESSAGE-----
> >
> >Hi!
> >
> >Using squid 1.1.8 I noticed a problem concerning ftp.
> >I=B4m not shure if it=B4s a configuration error or a bug:
> >
> >Anonymous FTP (like ftp://host) makes no problem until the
> >user first tries to make a non anonymous ftp (like ftp://user@host).
> >After that squid keeps his userid and converts every url like
> >ftp://host to ftp://user@host.
> >Even trying to do "ftp://anonymous@host" fails. Squid still replaces
> >"anonymous" with "user".
> >
> >This occurred with various version of Netscape for Windows and Unix,
> >Squid is running on a Ultra-Sparc.
> >
> >
> >Any ideas to solve this?
> =

> Please try this patch:
> =

> Index: src/ftp.c
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> RCS file: /surf1/CVS/squid/src/ftp.c,v
> retrieving revision 1.94.2.3
> diff -w -c -r1.94.2.3 ftp.c
> *** ftp.c 1997/03/05 18:58:11 1.94.2.3
> --- ftp.c 1997/03/06 17:46:18
> ***************
> *** 558,569 ****
> ftpData->request =3D requestLink(request);
> =

> /* Parse login info. */
> if ((auth =3D ftpGetBasicAuth(req_hdr))) {
> ftp_login_parser(auth, ftpData);
> ftpData->authenticated =3D 1;
> } else {
> - ftp_login_parser(request->login, ftpData);
> - if (*ftpData->user && !*ftpData->password) {
> /* This request is not fully authenticated */
> if (request->port =3D=3D 21) {
> sprintf(realm, "ftp %s", ftpData->user);
> --- 553,564 ----
> ftpData->request =3D requestLink(request);
> =

> /* Parse login info. */
> + ftp_login_parser(request->login, ftpData);
> + if (ftpData->user[0] && ftpData->password[0] =3D=3D '\0') {
> if ((auth =3D ftpGetBasicAuth(req_hdr))) {
> ftp_login_parser(auth, ftpData);
> ftpData->authenticated =3D 1;
> } else {
> /* This request is not fully authenticated */
> if (request->port =3D=3D 21) {
> sprintf(realm, "ftp %s", ftpData->user);
> =

> Duane W.
Received on Tue Jul 29 2003 - 13:15:40 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:11:14 MST