Edgewall Software
Modify

Opened 10 years ago

Closed 9 years ago

Last modified 9 years ago

#12101 closed defect (fixed)

IAuthenticator.authenticate() is called twice on each request

Reported by: Jun Omae Owned by: Jun Omae
Priority: normal Milestone: 1.0.7
Component: general Version:
Severity: minor Keywords:
Cc: Branch:
Release Notes:

Fix IAuthenticator.authenticate() being called twice on each request.

API Changes:
Internal Changes:

Description

$ egrep 'auth_cookie|Dispatch' log/trac.log
2015-06-04 21:50:00,165 Trac[main] DEBUG: Dispatching <RequestWithSession "GET '/'">
2015-06-04 21:50:00,167 Trac[util] DEBUG: SQL: SELECT name FROM auth_cookie WHERE cookie=%s
2015-06-04 21:50:00,170 Trac[util] DEBUG: SQL: SELECT name FROM auth_cookie WHERE cookie=%s
  • trac/web/main.py

    diff --git a/trac/web/main.py b/trac/web/main.py
    index 7694bea..fafe088 100644
    a b class RequestDispatcher(Component):  
    275275        if isinstance(req.session, FakeSession):
    276276            return FakePerm()
    277277        else:
    278             return PermissionCache(self.env, self.authenticate(req))
     278            return PermissionCache(self.env, req.authname)
    279279
    280280    def _get_session(self, req):
    281281        try:

Attachments (0)

Change History (2)

comment:1 by Jun Omae, 9 years ago

Release Notes: modified (diff)
Resolution: fixed
Status: newclosed

Committed with unit tests in [14147] and merged to trunk in [14148].

comment:2 by Jun Omae, 9 years ago

Owner: set to Jun Omae

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jun Omae.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Jun Omae to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.