httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Kraemer <Martin.Krae...@mch.sni.de>
Subject [PATCH] automatic ftp proxy login auth (via Basic auth)
Date Wed, 15 Jul 1998 23:24:56 GMT
The patch below deals with the problem that ftp login information in
apache (via the  proxy) *has to* travel in plain text as part of the URL.

Other servers try to log in to  the FTP server, and when that fails
return a 401 Unauthorized reply. I would appreciate if apache could do
that as well, so here's what I've done:

* When ftp://host is specified, an anonymous login is attempted.
  No 401 reply should be generated for anonymous login, even if that
  fails (?!)

* when ftp://user@host/... is given, a login attempt is made for the
  specified user. If that requires a password, a 401 is returned (with
  Basic Realm="ftp://user@host") and on authorized re-attempt the
  supplied user & password is passed to the ftp server (until successful).

* when ftp://user:pass@host/... is given, a login attempt is made for the
  specified user and password. If unsuccessful, a 401 is returned (with
  Basic Realm="ftp://user@host") and on authorized re-attempt the
  supplied user & password is passed to the ftp server (until successful).

Question: should a supplied (but wrong) password give a 403 Forbidden?

Further changes:
* partial code cleanup (simplified calling sequences for FTP & BUFF interface)

* For directory listings in the ftp proxy, apache now tries to
  determine the current directory. If it is different from what
  the user requested (as is ususally the case when ftp://user@host/
  was requested, or if a path component was a symlink), then the
  real directory name is shown below the clickable header.
  If the two paths agree, nothing "extra" is shown.

* [BUGFIX] If a user name was given in the ftp:// URL, then this user name
  should be reflected in the links in the directory listing because
  the directory structure is relative to the user's home directory,
  not to the root directory; all files should therefore be fetched from
  ftp://user@host and not from ftp://host

    Martin
-- 
| S I E M E N S |  <Martin.Kraemer@mch.sni.de>  |      Siemens Nixdorf
| ------------- |   Voice: +49-89-636-46021     |  Informationssysteme AG
| N I X D O R F |   FAX:   +49-89-636-44994     |   81730 Munich, Germany
~~~~~~~~~~~~~~~~My opinions only, of course; pgp key available on request

Mime
View raw message