I am still having issues with this on 2.9.12. Here is my routes.py:

BASE = '/web2py'

routes_in = (
    (BASE + '/$anything', '/$anything'),
)

routes_out = [(x, y) for (y, x) in routes_in]

In this case, if I try to go to an admin url (like /web2py/admin/debug) and 
I am not logged in as admin, on the user login page, the hidden POST field 
"send" is set to redirect me to /admin/debug:

<input type="hidden" name="send" value="/admin/debug/"/>

This happens with the Error 500 page and Ticket link generator as well.


 I tried looking in admin's appadmin.py and default.py controllers and 
could not find why either send=URL('site') or 
redirect(URL('admin','default','index',vars=dict(send=URL(args=request.args, 
vars=request.vars)))) is not picking up the correct routing and prepending 
the rendered URL with my BASE ('/web2py')


On Monday, May 12, 2014 at 10:06:56 PM UTC-4, cowbert wrote:
>
> When BASE is specified in a parameterized router, and an unauthenticated 
> session tries to go to the appadmin URL, the admin login controller fails 
> to prepend BASE to the value of the hidden form input element 'send', 
> causing redirection after authentication to redirect to the wrong URL (the 
> one without BASE). The session authentication is successful though, so 
> going to the appadmin URL after this will work.
>
> routes.py is the same as routes.parametric.example.py except that
>
> BASE = '/web2py'
>
> Going to:
> https://host/web2py/admin/default/design/welcome
>
> results in a redirection to:
>
>
> https://host/web2py/admin/default/index?send=%2Fadmin%2Fdefault%2Fdesign%2Fwelcome
>
> when send should really =%2Fweb2py%2Fadmin%2Fdefault%2Fdesign%2Fwelcome
>
> This is on 2.9.5-stable+timestamp.2014.03.16.02.35.39 with firefox 29. 
> The server does use a proxy to do the webserving, but the rewrite rule is 
> just  http[s]*://host/web2py/(.*) -> http://127.0.0.1:8080/$1 and the 
> reverse maps http://127.0.0.1:8080/(.*) back to http(s)://host/web2py/$1
>
> Is this a bug? Or is some setup wrong? (Everything else seems to be 
> working fine)
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to