Skip to content

Commit 8aa5765

Browse files
Merge pull request #3083 from DMPRoadmap/sql_injection_fix
untethered regex allows for sql injection
2 parents efc7dd1 + 3b2859c commit 8aa5765

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/controllers/concerns/paginable.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ module Paginable
88

99
##
1010
# Regex to validate sort_field param is safe
11-
SORT_COLUMN_FORMAT = /[\w_]+\.[\w_]/.freeze
11+
SORT_COLUMN_FORMAT = /[\w_]+\.[\w_]+$/.freeze
1212

1313
PAGINATION_QUERY_PARAMS = %i[page sort_field sort_direction
1414
search controller action].freeze

0 commit comments

Comments
 (0)