> On Sept. 18, 2023, 6:18 p.m., Don Bosco Durai wrote: > >
Sorry, I uploaded diff 2 twice. there's no difference between diff 2 and 3. > On Sept. 18, 2023, 6:18 p.m., Don Bosco Durai wrote: > > agents-common/pom.xml > > Line 20 (original), 20 (patched) > > <https://reviews.apache.org/r/74609/diff/1/?file=2279787#file2279787line20> > > > > Should we have the prefix "-3.0.0-20230918"? No, sorry, that was from my internal version. I'll change the pom file. > On Sept. 18, 2023, 6:18 p.m., Don Bosco Durai wrote: > > agents-common/src/main/java/org/apache/ranger/plugin/util/JavaScriptEdits.java > > Lines 51 (patched) > > <https://reviews.apache.org/r/74609/diff/1/?file=2279790#file2279790line51> > > > > I hope this won't throw an out of bound exception, but only returns null It only returns null. Here's what happens for the input 'var result = [[USER.dataCollection_Sensitivity]]. filter(function(n){ return [[n,"_"]][0] == TAG.value}); result.length !=0', for the 2 iterations of the while loop: INFO [main] (JavaScriptEdits.java:56) - ==> s0=[[USER.dataCollection_Sensitivity]] s1=USER.dataCollection_Sensitivity s2=null delim=, INFO [main] (JavaScriptEdits.java:56) - ==> s0=[[n,"_"]] s1=n s2=,"_" delim=_ > On Sept. 18, 2023, 6:18 p.m., Don Bosco Durai wrote: > > agents-common/src/main/java/org/apache/ranger/plugin/util/JavaScriptEdits.java > > Lines 56 (patched) > > <https://reviews.apache.org/r/74609/diff/1/?file=2279790#file2279790line56> > > > > Would there be an case where s0 to s2 will be null or not present if m.find() is true, then s0 and s1 won't be null, because they represent what was found. s2 can be null, as we saw above, with no problems. > On Sept. 18, 2023, 6:18 p.m., Don Bosco Durai wrote: > > agents-common/src/main/java/org/apache/ranger/plugin/util/JavaScriptEdits.java > > Lines 60 (patched) > > <https://reviews.apache.org/r/74609/diff/1/?file=2279790#file2279790line60> > > > > Should we store the original string and log both here to see what the > > original string was transformed? Done - Barbara ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/74609/#review225767 ----------------------------------------------------------- On Sept. 18, 2023, 8:36 p.m., Barbara Eckman wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/74609/ > ----------------------------------------------------------- > > (Updated Sept. 18, 2023, 8:36 p.m.) > > > Review request for ranger and madhan. > > > Repository: ranger > > > Description > ------- > > RANGER-4234: Eliminate need for splitting delimited strings into arrays in > policy conditions > > > Diffs > ----- > > agents-common/dev-support/spotbugsIncludeFile.xml PRE-CREATION > agents-common/pom.xml b753c1368 > > agents-common/src/main/java/org/apache/ranger/plugin/model/RangerPolicy.java > 9e5a94b1a > > agents-common/src/main/java/org/apache/ranger/plugin/policyengine/RangerRequestScriptEvaluator.java > 7ac20764f > > agents-common/src/main/java/org/apache/ranger/plugin/util/JavaScriptEdits.java > PRE-CREATION > > > Diff: https://reviews.apache.org/r/74609/diff/3/ > > > Testing > ------- > > > File Attachments > ---------------- > > 0001-doubleBracketsReplace-stuff.patch > > https://reviews.apache.org/media/uploaded/files/2023/09/18/fe38eef9-22e6-4c91-85a0-46fe337ba87b__0001-doubleBracketsReplace-stuff.patch > 0001-doubleBracketsReplace-stuff.patch > > https://reviews.apache.org/media/uploaded/files/2023/09/18/062f1050-96d7-4ed0-9008-fd65311ea7b0__0001-doubleBracketsReplace-stuff.patch > > > Thanks, > > Barbara Eckman > >
