wso2 / balana

Apache License 2.0
122 stars 110 forks source link

EqualFunction corner case for string "Any" #98

Open dandanes7 opened 6 years ago

dandanes7 commented 6 years ago

Hi! I was going through the implementation of the EqualFunction and saw this fragment

if (argValues[1] instanceof StringAttribute && XACMLConstants.ANY.equals(((StringAttribute) argValues[1]).getValue())) { return EvaluationResult.getInstance(true); }

If argValues[1], which comes from an AttributeDesignator, has the value "Any" then the evaluation result is true. What is the purpose of this corner-case? Is the keyword "Any" acting as a wildcard sort of thing, for example if my Attribute Designator returns the value "Any", then the evaluation is automatically true?

Thanks in advance, Dan