You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Java String replacement, the dollar sign $, has a special meaning in the replacement string. It is used to reference captured groups from the regular expression pattern so that we need to replace $ with \\$ to avoid the "No group 1" error when the binding marker is $ (PostgreSQL, H2)
Spring uses BUILTIN.put("PostgreSQL", BindMarkersFactory.indexed("$", 1)); for parameters in SQL which is specification of PostgreSQL
and which makes exception here at QuerydslParameterBinder
Thanks for detailed report. This is one example of why I was hesitant with changing the parameter binding logic but it was necessary to address security concerns.
In Java String replacement, the dollar sign
$
, has a special meaning in the replacement string. It is used to reference captured groups from the regular expression pattern so that we need to replace$
with\\$
to avoid the "No group 1" error when the binding marker is$
(PostgreSQL, H2)2023-08-28T21:28:29.657+09:00 ERROR [,64ec92e8680b208f92be7b679fc1ab54,84cf309240766b89] 80449 --- [actor-tcp-nio-1] s.g.e.ExceptionResolversExceptionHandler : Unresolved IndexOutOfBoundsException for executionId d49c4579-1
Spring uses
BUILTIN.put("PostgreSQL", BindMarkersFactory.indexed("$", 1));
for parameters in SQL which is specification of PostgreSQLand which makes exception here at
QuerydslParameterBinder
when the given parameterName contains
$1
,$2
...$n
then throwsNo group 1
because$
is not escapedmy suggestion would be
The text was updated successfully, but these errors were encountered: