Skip to content

Commit

Permalink
Merge pull request alexferl#72 from robbason/master
Browse files Browse the repository at this point in the history
Don't include /? in the next argument when user comes in to the index
  • Loading branch information
AdmiralObvious authored Mar 25, 2020
2 parents 1e5b4b0 + 3f5b13a commit 7dcddf2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion flask_simpleldap/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,8 +296,12 @@ def login_required(func):
@wraps(func)
def wrapped(*args, **kwargs):
if g.user is None:
next_path=request.full_path or request.path
if next_path == '/?':
return redirect(
url_for(current_app.config['LDAP_LOGIN_VIEW']))
return redirect(url_for(current_app.config['LDAP_LOGIN_VIEW'],
next=request.full_path or request.path))
next=next_path))
return func(*args, **kwargs)

return wrapped
Expand Down

0 comments on commit 7dcddf2

Please sign in to comment.