Ticket #2371 (closed defect: fixed)
post_login in new project should not call tg.url() when calling redirect()
| Reported by: | xavid | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 2.0.* bugfix |
| Component: | TurboGears | Version: | 2.0.1 |
| Severity: | normal | Keywords: | |
| Cc: | xavid@… |
Description
Currently, a line in the post_login method of the default root controller reads:
redirect(url('/login', came_from=came_from, __logins=login_counter))
This is wrong, because redirect calls tg.url() on its argument internally. Having tg.url() called twice causes problems when the TurboGears app is running at somewhere other than the server root, say under Apache. The correct line is:
redirect('/login', came_from=came_from, __logins=login_counter)
A patch (to tg.devtools/trunk) is attached.
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

Patch