Skip to content

Commit

Permalink
Merge branch 'fix/ras_url' of github.com:uc-cdis/fence into fix/ras_url
Browse files Browse the repository at this point in the history
  • Loading branch information
BinamB committed Aug 25, 2020
2 parents 7fa9cfc + 09c2258 commit 5ae046b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions fence/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,7 @@ def logout(next_url):
provider_logout = config["ITRUST_GLOBAL_LOGOUT"] + safe_url
elif provider == IdentityProvider.fence:
base = config["OPENID_CONNECT"]["fence"]["api_base_url"]
safe_url = urllib.parse.quote_plus(next_url)
provider_logout = base + "/logout?" + urllib.parse.urlencode({"next": safe_url})
provider_logout = base + "/logout?" + urllib.parse.urlencode({"next": next_url})

flask.session.clear()
redirect_response = flask.make_response(
Expand Down
3 changes: 1 addition & 2 deletions tests/test_logout.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,5 @@ def test_logout_fence(app, client, user_with_fence_provider, monkeypatch):
assert r.location.startswith(other_fence_logout_url)

parsed_url = urllib.parse.urlparse(r.location)
raw_redirect = urllib.parse.parse_qs(parsed_url.query).get("next")[0]
result_redirect = urllib.parse.unquote(raw_redirect)
result_redirect = urllib.parse.parse_qs(parsed_url.query).get("next")[0]
assert result_redirect == redirect

0 comments on commit 5ae046b

Please sign in to comment.