Skip to content

Boolean strings should be casted to boolean values #14

@ostrolucky

Description

@ostrolucky

From https://datatracker.ietf.org/doc/html/rfc7643#section-2.3.2

Boolean
The literal "true" or "false"

Azure is sending stuff like this via PATCH

{"op":"Replace","path":"roles[primary eq \"True\"].value","value":"employee"}

Here, I would expect return value from ComparisonExpression#compareValue is true. Instead, it's "True".

I suggest using

filter_var($filter->compareValue, FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions