Code

Opened 6 years ago

Closed 6 years ago

Last modified 5 years ago

#7567 closed (fixed)

modpython.authenhandler does not work

Reported by: dannychen Owned by:
Component: contrib.auth Version: 0.96
Severity: Keywords: mod_python
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

I follow the document <Authenticating against Django’s user database from Apache> but django always return apache.HTTP_UNAUTHORIZED.

At source C:\Python24\Lib\site-packages\django\contrib\auth\handlers\modpython.py,
modpython does not work on my pc box(winxp, apache 2.0, mod_python 3.3.1).
req.user always return null.

mod_python said req.get_basic_auth_pw() must called before using req.user.
My solution is, add

req.get_basic_auth_pw()

at line 30 before

kwargs = {'username': req.user, 'is_active': True}

Attachments (0)

Change History (1)

comment:1 Changed 6 years ago by Karen Tracey <kmtracey@…>

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to fixed
  • Status changed from new to closed

This line of code was already added in r6305. Fix won't be backported to 0.96 since it isn't a security fix, but it's in the current SVN code.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.