Skip to content
This repository has been archived by the owner on Jan 29, 2019. It is now read-only.

Impossible to override the redirect URL #248

Closed
peterbe opened this issue May 20, 2014 · 0 comments
Closed

Impossible to override the redirect URL #248

peterbe opened this issue May 20, 2014 · 0 comments

Comments

@peterbe
Copy link
Contributor

peterbe commented May 20, 2014

Suppose you have this:

<a href="#" data-next="/" class="browserid-login persona-button dark" >
    <span>Sign in</span>
</a>

And you override login_success or login_failure to do something like this:

return JSONResponse({'redirect': '/some/page'})

Then it will ignore that and instead go to $link.data('next') because this code.

Osmose pushed a commit to Osmose/django-browserid that referenced this issue Jun 22, 2014
By deciding whether to redirect the user to the next param URL or the
default URL in Python instead of JavaScript, we can rely on Django’s
is_safe_url logic.
@Osmose Osmose closed this as completed in c245679 Jun 24, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant