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

Projections: Empty Query returns every content item #8232

Closed
BenedekFarkas opened this issue Jul 1, 2019 · 2 comments · Fixed by #8813
Closed

Projections: Empty Query returns every content item #8232

BenedekFarkas opened this issue Jul 1, 2019 · 2 comments · Fixed by #8813
Assignees

Comments

@BenedekFarkas
Copy link
Member

Which can pretty much kill a site or even a whole server, even if you don't have many content items, just some Layout (as in Orchard.Layouts) that renders the Query.

@BenedekFarkas BenedekFarkas added this to the Orchard 1.10.4 milestone Jul 1, 2019
@sebastienros
Copy link
Member

Add default paging? or prevent it?

@BenedekFarkas
Copy link
Member Author

I wouldn't return any results in this case to be on the safe side. I don't really see any usefulness in returning every content item in the system, especially that it could leak sensitive information (since e.g. Users are content items too).

@BenedekFarkas BenedekFarkas self-assigned this Nov 27, 2024
BenedekFarkas added a commit that referenced this issue Jan 14, 2025
…oup (#8813)

* Projections: Returning empty list of content items instead of every content item when the query has no filters

* Better solution to skip processing empty filter groups, instead of returning nothing when there's an empty filter group

* Code styling and comments

* Code styling in ProjectionPartDriver, QueryPartDriver and ProjectionManager

* Reverting functional change to ignore empty filter groups

* Code styling in AdminController, ProjectionPartDriver and QueryPartDriver

* Adding notification when saving a Query or a ProjectionPart to warn about the effect of an empty filter group

* Fixing that upgrading Newtonsoft.Json 13.x broke the SpecFlow test execution app
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

Successfully merging a pull request may close this issue.

2 participants