Skip to content

Commit 17ecda0

Browse files
committed
Ensure RequestForgeryProtection#normalize_action_path is private
`normalize_relative_action_path` added in 033acf8, but was not intended to be public. It was following the pattern set in bc47815 for `normalize_action_path` which also should not be public. The only seemingly real usage that I could find of this was removed from gitlab years ago: https://gitlab.com/gitlab-org/gitlab/-/commit/834b6d69 Based on: https://github.com/search?q=normalize_action_path+language%3ARuby&type=code&ref=advsearch&p=1
1 parent ce46560 commit 17ecda0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

actionpack/lib/action_controller/metal/request_forgery_protection.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -642,7 +642,7 @@ def valid_request_origin? # :doc:
642642
end
643643
end
644644

645-
def normalize_action_path(action_path) # :doc:
645+
def normalize_action_path(action_path)
646646
uri = URI.parse(action_path)
647647

648648
if uri.relative? && (action_path.blank? || !action_path.start_with?("/"))
@@ -652,7 +652,7 @@ def normalize_action_path(action_path) # :doc:
652652
end
653653
end
654654

655-
def normalize_relative_action_path(rel_action_path) # :doc:
655+
def normalize_relative_action_path(rel_action_path)
656656
uri = URI.parse(request.path)
657657
# add the action path to the request.path
658658
uri.path += "/#{rel_action_path}"

0 commit comments

Comments
 (0)