Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(PXP-8286): fix(google): add redirect validation to /link/google #927

Merged
merged 5 commits into from
Jun 15, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions fence/blueprints/link.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from cdislogging import get_logger

from cirrus import GoogleCloudManager
from fence.blueprints.login.redirect import validate_redirect
from fence.restful import RestfulApi
from fence.errors import NotFound
from fence.errors import Unauthorized
Expand Down Expand Up @@ -101,6 +102,9 @@ def delete(self):
def _link_google_account():
provided_redirect = flask.request.args.get("redirect")

# will raise UserError if invalid
validate_redirect(provided_redirect)

if not provided_redirect:
raise UserError({"error": "No redirect provided."})

Expand Down