Skip to content

Commit 2cd7460

Browse files
Making code branches explicit
Co-authored-by: Rafael Mendonça França <[email protected]>
1 parent b8e4640 commit 2cd7460

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

actionpack/lib/action_controller/metal/request_forgery_protection.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -637,10 +637,10 @@ def normalize_action_path(action_path) # :doc:
637637
uri = URI.parse(action_path)
638638

639639
if uri.relative? && (action_path.blank? || !action_path.start_with?("/"))
640-
return normalize_relative_action_path(uri.path)
640+
normalize_relative_action_path(uri.path)
641+
else
642+
uri.path.chomp("/")
641643
end
642-
643-
uri.path.chomp("/")
644644
end
645645

646646
def normalize_relative_action_path(rel_action_path) # :doc:

0 commit comments

Comments
 (0)