ctubbsii commented on code in PR #6402:
URL: https://github.com/apache/accumulo/pull/6402#discussion_r3562751632


##########
core/src/main/java/org/apache/accumulo/core/iterators/user/VisibilityFilter.java:
##########
@@ -64,10 +68,29 @@ public void init(SortedKeyValueIterator<Key,Value> source, 
Map<String,String> op
 
     if (!filterInvalid) {
       String auths = options.get(AUTHS);
-      Authorizations authObj = auths == null || auths.isEmpty() ? new 
Authorizations()
-          : new Authorizations(auths.getBytes(UTF_8));
-
-      this.accessEvaluator = BytesAccess.newEvaluator(authObj);
+      if (auths == null || auths.isEmpty()) {
+        this.accessEvaluator = EMPTY_EVALUATOR;
+      } else if (!auths.contains(Authorizations.HEADER)) {

Review Comment:
   This should use startsWith (the header could appear in the old format, 
inside of quotes, but can only appear at the beginning if it's in the 
standard/newer serialized format)
   
   ```suggestion
         } else if (!auths.startsWith(Authorizations.HEADER)) {
           // the old serialization format does not support multiple auth sets, 
so treat the whole thing as one set
   ```
   



-- 
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]

Reply via email to