This topic is locked

rest api - modify parameter names

3/16/2023 10:47:14 AM
PHPRunner General questions
C
chanpeter88 author

table=categories&action=insert&CategoryName=Beer&Description=Beer and stuff
change to
type=categories&action=insert&typename=Beer&desc=Beer and stuff
is it possible to modify?

Sergey Kornilov 3/16/2023

These parameters are your field names, need to match field names in the database. If you need to change those parameters names, change names of those fields in the database.

C
chanpeter88 author 3/16/2023

since i want to release rest api for public use, i am particularly concerned about "table=categories" as anyone will know the table name. i worry if there is any security issue eg. SQL injection.

Sergey Kornilov 3/16/2023

Table or field name being known to public doesn't present SQL injection issues. Poorly written code does.
Make sure to read this article:
https://xlinesoft.com/blog/2021/06/17/secure-low-code-web-applications/