[mod_python] Problem with win32 installation - can't authenticate

Gregory (Grisha) Trubetskoy grisha at modpython.org
Thu Jul 10 21:00:37 EST 2003


Thanks Jacob for the config -

I figured it out - it has to do with the placement of LoadModule in the
config file. I tend to put mine first, which makes mod_auth first in line
to process, and it internally calls get_basic_auth_pw() thereby filling in
the req.user value. But if you place mod_python after mod_auth, then
mod_python is called first, and req->user is NULL (or req.user is None).

I'll make sure this is corrected in the docs for the next release.

Grisha

On Thu, 10 Jul 2003, Jacob Martinson wrote:

> Grisha,
>
> The browser comes back with a prompt again a number of times and then
> eventually I end up at the access forbidden page.  The strangest thing just
> happened though... I switched the order of getting the username and
> password, and it started working!  I haven't changed anything in the apache
> config between then and now.
>
> Thanks!
>
> -Jacob
>
> At 07:50 PM 7/10/2003 -0400, Gregory (Grisha) Trubetskoy wrote:
>
>
> >On Thu, 10 Jul 2003, Jacob Martinson wrote:
> >
> > > I am prompted for username/password, but I can't authenticate
> > > successfully.  Also, if I ignore req.user and password and just return
> > > apache.OK, it allows me to access the file I am requesting.
> >
> >When you say "can't authenticate" - does the browser come back with the
> >user/password dialog, or some other thing?
> >
> >I just tried your example, and it worked for me.... In the old versions of
> >apache you had to call to call get_basic_auth_pw() before trying to read
> >value of req.user, but that's not longer true I think. May be tried
> >swapping those two lines, but I think the problem is elsewhere.
> >
> >Grisha
>


More information about the Mod_python mailing list