r/PHPhelp • • Feb 08 '25

Security issue with script to fetch data dynamically

Hi,

I'm working on a PHP script to serve as a unified script for all frontend table pages. It functions in a way that the frontend sends the table name and column names, and the backend script then retrieves the data. This approach avoids loading all the data at once, which can be time-consuming for large datasets. The script also supports search and conditional queries.

I posted this on r/php for assistance, but I was informed that the script has several security vulnerabilities. The post request can be intercepted, allowing users to query any table they desire. I'm hoping someone can help me address these issues.

Here's the GitHub repository for the project: https://github.com/aliosayle/php-datatable-with-backed-processing.git

1 Upvotes

27 comments sorted by

View all comments

Show parent comment

1

u/AshleyJSheridan Feb 09 '25

SQLite is not a database? What are you on? You are a little confused about what a database actually is. MongoDB is literally a database. You not believing that doesn't make it any less so.

A CSV is not a database. A group of CSV files could be used as the storage mechanism one, but a single CSV file on its own would not constitute as such.