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

prevent lengthMenu manipulation through the dom #230

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

DrAlghazali
Copy link

this will add a way to prevent a server hit on large tables if the end user has changed the length value through the dom

lengthMenu

@AllanJard
Copy link
Contributor

Thanks for the PR. I've wondered about this sort of thing before, but never implemented it as it is still trivial to bypass. Just intercepting the XHR request and then modifying the value, or changing the initialisation objects of DataTables. As a result, I'm inclined not to pull this in because it is still easy to bypass, and thus just adds a little extra weight to the code base.

Is this a problem you've run into - people requesting more data than they should? The only "real" fix is to make use that the page length is 10 / 25 / 50 / whatever at the server-side and enforcing it there.

@DrAlghazali
Copy link
Author

thank you Allan, yes the server the side is main way to go with this kind of issues. it was meant to make a quick fix for such an issue from the core client side. I already have implemented a server side fix for this on my Editor code

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 this pull request may close these issues.

2 participants