Skip to content

Commit

Permalink
Avoid regex backtracking on If-None-Match header
Browse files Browse the repository at this point in the history
  • Loading branch information
jhawthorn committed Jan 17, 2023
1 parent a7cda7e commit 8dc4595
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion actionpack/lib/action_dispatch/http/cache.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def if_none_match
end

def if_none_match_etags
if_none_match ? if_none_match.split(/\s*,\s*/) : []
if_none_match ? if_none_match.split(",").each(&:strip!) : []
end

def not_modified?(modified_at)
Expand Down

0 comments on commit 8dc4595

Please sign in to comment.