-
-
Notifications
You must be signed in to change notification settings - Fork 217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pihole 6 webserver exposes code from other files on regular webserver #2349
Comments
This collides with other (older) feature requests where users are explicitly asking to serve (static and Lua server-page) files hosted in |
My expecation would be to only serve |
This is a webserver specific for the service pihole.
Yeah, something like that would be great, but in my opinion it should really be the default, to only serve /admin and /api. |
I am concerned about preserving existing behavior, whether this may be good or bad. To avoid breaking established "abuses" of the webserver for whatever reasons the users may done this. My point is that Pi-hole was serving this directory through My proposal is, hence,
The response to such forbidden request could either be |
But in the state it is in now, it doesn't work either. |
I'm in the "default to false" camp on this one. Unless explicitly asked to by the user, we should only serve the admin interface and the API. I'd probably hazard that only a minority of people would be affected by this either way. I thought I saw a PR somewhere to fix the update scripts to enable them to make proper use of Maybe we could even consider changing the webroot by default anyway |
We'd need to move the repo over. |
But this is a fair point. In v5, we just happened to be using a different web server. Often times people would also have
Well... yes, but I figured that much was obviously implied in what I was typing 😉 |
Even though I am still not really convinced, I am also not going to insist on my own opinion if I'm the only one here. Please play with branch
# Should the web server serve all files in webserver.paths.webroot directory? If
# disabled, only files within the path defined through webserver.paths.webhome and
# /api will be served.
serve_all = false |
The ability to serve pages that extend Pi-hole/FTL through the embedded
Edit: Sorry, I think we should not serve pages by default.
It would probably be easier to whitelist the extensions or mime types of files that are allowed.
Oh crap, not LHFS again... |
This issue is stale because it has been open 30 days with no activity. Please comment or update this issue or it will be closed in 5 days. |
Versions
Platform
Expected behavior
the pihole webserver should only display or execute files in the defined subpath
Actual behavior / bug
default webroot is a
/var/www/html/
so if I open the pihole webserver overhttps://127.0.0.1:8443
it exposes the code of my index.php. This happens to all files on the webserver.The pihole webserver should be blocking everything, which isn't in the defined subpath or redirect to the subpath.
Steps to reproduce
Steps to reproduce the behavior:
The text was updated successfully, but these errors were encountered: