View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 20672 | Bug reports | Installation | public | 2026-09-06 06:36 | 2026-09-21 21:59 |
| Reporter | coffee-jinn-2002 | Assigned To | c_schmitz | ||
| Priority | none | Severity | minor | ||
| Status | closed | Resolution | fixed | ||
| Summary | 20672: HTTP 400 "The requested hostname is invalid" does not mention allowed_hosts.php, leaving admins without a way to recover | ||||
| Description | When a request arrives with a host name that is not listed in
The message does not mention allowed_hosts.php, the config directory, or This matters because the allowed hosts file is created automatically, and In application/controllers/admin/Authentication.php (line 185 in
That wording is clear and actionable. However it is a one-time flash The exception itself is thrown in application/core/LSHttpRequest.php
This is easy to run into with common deployment patterns:
In both cases the first login writes "localhost" as the only trusted I hit this while deploying LimeSurvey 7.0.11 in Docker behind nginx. I | ||||
| Steps To Reproduce | Steps to reproduce
Expected resultThe error page tells the administrator which file controls this, so that
LimeSurvey already contains suitable wording in Actual resultA generic error page with no reference to allowed_hosts.php and no
(See attached 400-invalid-hostname.html for the full response.) | ||||
| Tags | No tags attached. | ||||
| Bug heat | 10 | ||||
| Complete LimeSurvey version number (& build) | 7.0.11+260821 | ||||
| I will donate to the project if issue is resolved | No | ||||
| Browser | Chrome | ||||
| Database type & version | MariaDB 11.4 | ||||
| Server OS (if known) | Debian (inside Docker container) on Rocky Linux 10 host | ||||
| Webserver software & version (if known) | Apache 2.4.68 (Debian), behind nginx 1.26.3 as reverse proxy | ||||
| PHP Version | 8.5.10 | ||||
|
I am happy to prepare a pull request for this if the approach is acceptable. |
|
|
Adding a screenshot of the error page. The description refers to an HTML capture, but the saved HTML references |
|
No, it's not for all user (and clearly not for hacker) Idea :
|
|
|
However, writing a log file to a public directory is a bad idea. |
|
We already do it for plugin.log And not public if use apache (issue #20425 for example) |
|
|
I am not sure which side is correct, sorry. But I tryed on my install Apache and nginx are different here. On my server (Apache behind nginx as
But nginx does not read .htaccess at all, so with PHP-FPM + nginx the same My feeling, if I may say: I am a little afraid to depend on the web server Anyway that is your decision. Can I prepare a pull request for the parts that |
|
14637: New install : allow to set runtimePath at installer @coffee-jinn-2002 maybe you do not have plugin installed and log error. |
|
|
Thank you for 14637, I did not know it. That is exactly the place question, About the plugin - yes, I have one (our own), so plugin.log exists here (438 But I should also say the 403 is not really about the file. The .htaccess
So on Apache it is protected even with no log file, and on nginx none of this Then, can I make the pull request for the Yii::log() part and the generic |
|
|
I don't like either solution. |
|
|
Fixed in Release 7.1.2+260917 |
|
|
Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=40385 |
|
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2026-09-06 06:36 | coffee-jinn-2002 | New Issue | |
| 2026-09-06 06:39 | coffee-jinn-2002 | Note Added: 85586 | |
| 2026-09-06 06:39 | coffee-jinn-2002 | Bug heat | 0 => 2 |
| 2026-09-06 06:40 | coffee-jinn-2002 | Issue Monitored: coffee-jinn-2002 | |
| 2026-09-06 06:40 | coffee-jinn-2002 | Bug heat | 2 => 4 |
| 2026-09-06 11:09 | coffee-jinn-2002 | Note Added: 85587 | |
| 2026-09-06 11:09 | coffee-jinn-2002 | File Added: 400-invalid-hostname.png | |
| 2026-09-07 09:09 | DenisChenu | Note Added: 85589 | |
| 2026-09-07 09:09 | DenisChenu | Bug heat | 4 => 6 |
| 2026-09-07 09:31 | c_schmitz | Note Added: 85593 | |
| 2026-09-07 09:31 | c_schmitz | Bug heat | 6 => 8 |
| 2026-09-07 09:37 | DenisChenu | Note Added: 85594 | |
| 2026-09-09 09:07 | coffee-jinn-2002 | Note Added: 85615 | |
| 2026-09-09 10:25 | DenisChenu | Note Added: 85617 | |
| 2026-09-09 11:51 | coffee-jinn-2002 | Note Added: 85618 | |
| 2026-09-17 00:13 | c_schmitz | Note Added: 85804 | |
| 2026-09-17 13:12 | LimeBot | Note Added: 85808 | |
| 2026-09-17 13:12 | LimeBot | Status | new => closed |
| 2026-09-17 13:12 | LimeBot | Resolution | open => fixed |
| 2026-09-17 13:12 | LimeBot | Bug heat | 8 => 10 |
| 2026-09-19 22:43 | c_schmitz | Changeset attached | => LimeSurvey master 4a0e13d2 |
| 2026-09-19 22:43 | c_schmitz | Note Added: 85854 | |
| 2026-09-19 22:43 | c_schmitz | Assigned To | => c_schmitz |
| 2026-09-19 22:43 | c_schmitz | Status | closed => resolved |
| 2026-09-21 21:59 | c_schmitz | Status | resolved => closed |