Skip to content

Commit 268815f

Browse files
authored
Merge pull request #2304 from koic/accept_nested_functions_in_dangerous_query_methods
Accept nested functions in Dangerous Query Methods
2 parents a3570b6 + a1b3a1d commit 268815f

File tree

1 file changed

+2
-2
lines changed
  • lib/active_record/connection_adapters/oracle_enhanced

1 file changed

+2
-2
lines changed

lib/active_record/connection_adapters/oracle_enhanced/quoting.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ def column_name_with_order_matcher
142142
(
143143
(?:
144144
# "table_name"."column_name" | function(one or no argument)
145-
((?:\w+\.|"\w+"\.)?(?:\w+|"\w+")) | \w+\((?:|\g<2>)\)
145+
((?:\w+\.|"\w+"\.)?(?:\w+|"\w+") | \w+\((?:|\g<2>)\))
146146
)
147147
(?:(?:\s+AS)?\s+(?:\w+|"\w+"))?
148148
)
@@ -155,7 +155,7 @@ def column_name_with_order_matcher
155155
(
156156
(?:
157157
# "table_name"."column_name" | function(one or no argument)
158-
((?:\w+\.|"\w+"\.)?(?:\w+|"\w+")) | \w+\((?:|\g<2>)\)
158+
((?:\w+\.|"\w+"\.)?(?:\w+|"\w+") | \w+\((?:|\g<2>)\))
159159
)
160160
(?:\s+ASC|\s+DESC)?
161161
(?:\s+NULLS\s+(?:FIRST|LAST))?

0 commit comments

Comments
 (0)