Modify

Opened 16 years ago

Last modified 12 years ago

#4025 new defect

TracCas always redirected me back to CAS which put my browser in an infinite loop

Reported by: anonymous Owned by: David Gelhar
Priority: normal Component: TracCasPlugin
Severity: blocker Keywords:
Cc: Trac Release: 0.12

Description

The code at http://trac-hacks.org/browser/traccasplugin/0.11/traccas/traccas.py seems to be missing something. When i click on the login link in trac i end up at the cas login. After I log into cas I get redirected to trac's login page

I put debug code into TracCas and determined that the "authenticate" function was working but for some reason the "_do_login" function never had the right value for req.remote_user so TracCas always redirected me back to CAS which put my browser in an infinite loop

By simply replacing the "if not req.remote_user:" with "if not req.authname or req.authname == 'anonymous':" in the "_do_login" function TracCas seems to work properly.

Attachments (0)

Change History (6)

comment:1 Changed 16 years ago by Willy

I get the same symptom when I install more than on Trac environment on a server. All environments besides the first one installed will fall into a redirect loop.

I'm on Trac 0.11.4 running on Python 2.4.2 in SLES 11 (64 bit)

comment:2 in reply to:  1 Changed 16 years ago by Willy

Replying to advicepig:

I get the same symptom when I install more than on Trac environment on a server. All environments besides the first one installed will fall into a redirect loop.

I'm on Trac 0.11.4 running on Python 2.4.2 in SLES 11 (64 bit)

After some more testing, I've found that this behavior isn't about have more than one environment, but setting the repository_dir in the trac section of conf/trac.ini stopped the redirecting funny business. In previous tests, I had the location blank since our secondary environments weren't actually related to code...

comment:3 Changed 14 years ago by Alex

Severity: normalblocker
Trac Release: 0.110.12

On Trac 0.12 seems to work only if you put in a path to a directory that is not an svn repository. Endless loop or browser reported impossible redirect appears to happen with a blank entry or a valid entry for the repository_dir.

comment:4 Changed 14 years ago by trac@…

I would look at: http://informatics.kumc.edu/work/ticket/263#comment:2 for a solution to the endless loop problem.

comment:5 Changed 14 years ago by anonymous

Solution from initial description worked for me. Trac 0.12, CAS plugin from this svn:

URL: http://trac-hacks.org/svn/traccasplugin/0.11 Repository Root: http://trac-hacks.org/svn Repository UUID: 7322e99d-02ea-0310-aa39-e9a107903beb Revision: 10267

comment:6 Changed 12 years ago by Ryan J Ollos

Owner: changed from Noah Kantrowitz to David Gelhar

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain David Gelhar.

Add Comment


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

 
Note: See TracTickets for help on using tickets.