Skip to content

Commit 8dc4595

Browse files
committed
Avoid regex backtracking on If-None-Match header
[CVE-2023-22795]
1 parent a7cda7e commit 8dc4595

File tree

1 file changed

+1
-1
lines changed
  • actionpack/lib/action_dispatch/http

1 file changed

+1
-1
lines changed

actionpack/lib/action_dispatch/http/cache.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def if_none_match
1818
end
1919

2020
def if_none_match_etags
21-
if_none_match ? if_none_match.split(/\s*,\s*/) : []
21+
if_none_match ? if_none_match.split(",").each(&:strip!) : []
2222
end
2323

2424
def not_modified?(modified_at)

0 commit comments

Comments
 (0)