P
P
Pavel2019-12-26 11:50:04
Laravel
Pavel, 2019-12-26 11:50:04

How to handle form data on server, injection?

All with the upcoming!
I can insert a script into the feedback form and it will be released in the same form in orders, it turns out that you can make all sorts of injections
. How can I protect myself from this and how are they protected?
I know that you can use something like this in the output

{!! html_entity_decode(nl2br(e($m->description))) !!}

but is it safe? Do I need to insert special characters before entering into the database?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alex Wells, 2019-12-27
@Alex_Wells

Write to the database as is, output with screening (any templating engine or frontend frame has it out of the box). In the case of blade it's {{ }}, why the hell are you using {!! !!} I do not understand.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question