pan3793 commented on code in PR #7408:
URL: https://github.com/apache/kyuubi/pull/7408#discussion_r3119540915
##########
kyuubi-common/src/main/scala/org/apache/kyuubi/service/authentication/ldap/Query.scala:
##########
@@ -56,7 +58,9 @@ object Query {
* @return the current instance of the builder
*/
def filter(filterTemplate: String): Query.QueryBuilder = {
- this.filterTemplate = new ST(filterTemplate)
+ val group = new STGroup()
+ this.filterTemplateGroup = Some(group)
+ this.filterTemplate = new ST(group, filterTemplate)
Review Comment:
okay, as this is only used internally, we don't have such anti-patterns yet,
let's somehow document those dangerous behaviors
BTW, this part of the code is ported from Apache Hive, it should have the
same issue
https://github.com/apache/hive/blob/branch-4.2/service/src/java/org/apache/hive/service/auth/ldap/Query.java#L90
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]