Ticket #346: redirect.diff

File redirect.diff, 0.5 kB (added by adeason@tjhsst.edu, 3 years ago)

Patch to redirect a user to the project main page upon successful authentication if the page referer is unknown.

  • 0.9/authform/web_ui.py

    old new  
    164164                req.authname = remote_user 
    165165                req.outcookie['trac_auth'] = cookie 
    166166                req.outcookie['trac_auth']['path'] = self.env.href() 
    167                 req.redirect(req.args.get('ref')
     167                req.redirect(req.args.get('ref') or self.env.abs_href()
    168168        else: 
    169169                # No authentication information passed, display a form 
    170170                req.hdf['title'] = 'Login'