Skip to content
This repository was archived by the owner on May 14, 2022. It is now read-only.
This repository was archived by the owner on May 14, 2022. It is now read-only.

Isn't defining the fields in "aoColumns" a big security issue? #17

@Maeldor

Description

@Maeldor

Hi,

I'm new to DataTables and this bundle (and GitHub, in fact; I registered to ask this question!), so apologies if this has been addressed already, but I can't seem to get my head around one thing... Isn't defining the columns in the actual request a big security issue?

I don't know if this is a problem with DataTables itself, or just this bundle, but from following the documentation, it looks like the only way to define the fields to query is for it to be done in the actual public page's code, as detailed here:

    "aoColumns": [
        { "mData": "id" },
        { "mData": "description" },
        { "mData": "customer.firstName" },
        { "mData": "customer.lastName" },
        { "mData": "customer.location.address" }
    ]

To begin with, I dislike having such a thing visible to the public, as it unnecessarily exposes the inner workings of the data. But even more importantly, there's nothing stopping anyone altering the request to get different fields, many of which could contain sensitive data, like passwords (hashed of course!).

Am I really missing something here? I don't understand how such a monumental security flaw like this hasn't already been mentioned, let alone even be possible in the first place, and nothing about is mentioned in the documentation at all.

I would definitely prefer a way to define my fields server-side instead (in my case, in the controller during the creation/retrieval of the datatable itself). Can this be done? I don't want the request to be able to make such a decision! Ever!

Thanks very much,

Maeldor

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions