dnnsoftware / Dnn.Platform

DNN (formerly DotNetNuke) is the leading open source web content management platform (CMS) in the Microsoft ecosystem.
https://dnncommunity.org/
MIT License
1.01k stars 745 forks source link

[Enhancement]: Add Limits for search result #6033

Closed Mostafa-Moafi closed 1 month ago

Mostafa-Moafi commented 1 month ago

Is there an existing issue for this?

Description of problem

There is a search service between the content and the blog, which contains a parameter called pageSize. The attacker can change the output value of the program by increasing this parameter. For example, by increasing this number, the output of the program can be several megabytes. This problem causes the query of the program with the database to run longer and in case of successive attacks, it will cause the server to waste resources and eventually fail.

this service is /API/internalservices/searchService/search in DotNetNuke.Web project

Description of solution

we can add a number to maximum page sizes in SearchServiceController

Description of alternatives considered

No response

Anything else?

No response

Do you be plan to contribute code for this enhancement?

Would you be interested in sponsoring this enhancement?

Code of Conduct