Opened 6 years ago

Last modified 9 months ago

#4963 new defect

Redirection problem with different hostnames in NAT

Reported by: angel Owned by: ejucovy
Priority: normal Component: PermRedirectPlugin
Severity: major Keywords:
Cc: Trac Release: 0.11



  • Server is named lets say 'herbert' with Trac
  • Server is in a NAT, port 443 is open and forwarded to herbert
  • dyndns account lets say
  • Trac 0.11, PermRedirect 2.0, AccountManager 0.2.1dev-r5479

What happens

This only happens when PermRedirect Plugin is enabled.

Attachments (0)

Change History (3)

comment:1 Changed 3 years ago by ejucovy

I haven't figured out how to reproduce this. That said, PermRedirectPlugin passes the full request path as "referer", including the protocol and hostname. I don't think there's any need for it to do that, and it's possible that it's related to this problem.

If anyone is still experiencing this problem, could you try with this patch (against the plugin's trunk) and see if it makes any difference?

  • permredirect/

    2626            exctype, exc = sys.exc_info()[0:2]
    28             ref_url = req.base_url + req.path_info
    29             if req.query_string:
    30                 ref_url = ref_url + "?" + req.query_string
     28            ref_url = req.href(req.path_info, req.arg_list)
    3129            login_url = req.href.login(referer=ref_url)
    3331            if issubclass(exctype, PermissionError):

comment:2 Changed 2 years ago by ejucovy

  • Owner changed from coderanger to ejucovy
  • Summary changed from Redirection problem with different hostnames to Redirection problem with different hostnames in NAT

It would also be useful to know the value of the base_url setting when this occurs.

comment:3 Changed 9 months ago by hasienda

Reported behaviour should be re-evaluated with a current version of AccountManagerPlugin, because redirection after login has seen substantial changes since 0.2.1dev. Btw 0.2.1dev has been rendered irrelevant due to so many fixed issues, that it seem silly to stay at such an ancient version any longer.

Add Comment

Modify Ticket

as new The owner will remain ejucovy.

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

Note: See TracTickets for help on using tickets.