6
6
655362015-10-27 20:17:38
PHP
65536, 2015-10-27 20:17:38

Is there an alternative to HTTP_HOST without hardcoding?

Here is a good description of the problem habrahabr.ru/post/166855 and two solutions, one with setting allowed hosts in php, the second in general in nginx configs.
Maybe there are other options? The goal is to get rid of the hole and additional rituals when transferring to another host

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Aksentiev, 2015-10-27
@Sanasol

Don't use http_host in scripts?

D
Dmitry Evgrafovich, 2015-10-27
@Tantacula

I may have missed something or did not understand, please explain. Here I collect statistics on visits and http_host, like all other data, is written to the database through pdo or orm, which uses the same pdo. How does the attacker implement the injection?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question