R
R
Roman2021-02-19 22:40:55
symfony
Roman, 2021-02-19 22:40:55

Do you need additional actions for security on incoming form (API) data, other than those that already exist by default (Type in Entity)?

Data comes from the form through the JSON-API, to put it in the database, and then display it.

Can you please tell me if Symfony somehow filters them? Well, how is it done in PDO?

Do you need to do something with them additionally, besides what is already there (indication of the type in the model / entity)?

And if so, what exactly?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Daria Motorina, 2021-02-20
@glaphire

In theory, specifying scalar types at the php level and mapping the doctrine should be enough, you can specify Type validation in order to catch mismatches or validate non-scalar types using the symphony tools.
You can also do this article (I think this is the most correct option)
How to validate raw values

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question