Opened 6 years ago

Closed 6 years ago

#13932 closed (invalid)

URL with Hash and login_required

Reported by: azim@… Owned by: nobody
Component: contrib.auth Version: 1.2
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


If i try to open any login required site(decorator @login_required()) with hash on URL (like, it will redirected to

But after login, it redirected to and not to

Change History (3)

comment:1 follow-up: Changed 6 years ago by ivan@…

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

Sure, your link is actually the link with html id #profiles/user/edit.

So Django understand it as, it's normal and can't be fixed.

comment:2 in reply to: ↑ 1 Changed 6 years ago by anonymous

Sorry, my previous comment was wrong, because I can't reproduce the bug.

My actions:

  • Signed in

So please provide more details or test case.

comment:3 Changed 6 years ago by mtredinnick

  • Resolution set to invalid
  • Status changed from new to closed

Redirects at the HTTP level can't preserve anchors and that's how the login pass works. The server never sees the anchor and without Ajax-y tricks, there's nothing we can do. Closing for now, based on what's known here.

Note: See TracTickets for help on using tickets.
Back to Top