A
A
Artem Gartung2020-05-01 00:23:58
PHP
Artem Gartung, 2020-05-01 00:23:58

How to protect the site from hacking on a GET request?

How to protect the site from hacking on a GET request?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
L
Lev Rozanov, 2020-05-02
@blackangelada

$var_name = htmlspecialchars(trim(strip_tags(stripslashes($_POST['var_name']))));
$var_name = htmlspecialchars(trim(strip_tags(stripslashes($_GET['var_name']))));

F
FanatPHP, 2020-05-01
@FanatPHP

Don't defend at all.
There are no "hacks" on a "GET request" in nature.

X
xmoonlight, 2020-05-01
@xmoonlight

Everything that came from the user must be immediately run through the regular expression (filter) to determine the presence of "left" characters and that's it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question