Skip to content

Commit

Permalink
fix(session destroy): ensure valid redirect path
Browse files Browse the repository at this point in the history
  • Loading branch information
stakach committed Sep 29, 2021
1 parent 3463787 commit 76ca6f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/auth/sessions_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ def destroy
# do we want to redirect externally?
path = params.permit(:continue)[:continue] || '/'

if path.start_with?(".") || path.include?("//")
if !path.start_with?("/") || path.include?("//")
authority = current_authority
uri = Addressable::URI.parse(path)

Expand Down

0 comments on commit 76ca6f6

Please sign in to comment.