Skip to content

Allow configuration of MONGO_QUERY_WHITELIST #1351

@arnauorriols

Description

@arnauorriols

Currently the set of allowed operators is fixed in code, which makes sense to avoid unwanted surprises in new versions of MongoDB, but makes the process of including new operators rather rigid.

For example, I now wanted to experiment with the $expr operator, but I don't have any aggregation operator available. The $eq operator is missing too.

I propose to include eq in the set of operators allowed (I assume it's just a forgetfulness), and also add a configuration called MONGO_QUERY_WHITELIST, where one can add all the extra operators needed.

What do you think?

I'll push a PR later

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions