Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow configuration of MONGO_QUERY_WHITELIST #1351

Closed
arnauorriols opened this issue Jan 30, 2020 · 1 comment
Closed

Allow configuration of MONGO_QUERY_WHITELIST #1351

arnauorriols opened this issue Jan 30, 2020 · 1 comment
Milestone

Comments

@arnauorriols
Copy link
Contributor

@arnauorriols arnauorriols commented Jan 30, 2020

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

@nicolaiarocci
Copy link
Member

@nicolaiarocci nicolaiarocci commented Feb 1, 2020

Rather stunned that $eq has been missing, and for such a long time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants