Giter VIP home page Giter VIP logo

Comments (4)

AzureMarker avatar AzureMarker commented on August 15, 2024

Interesting... I've not thought of this usage, but I'm sure it can be manually modified or an editable approved list of domain names can be implemented. The reason for those lines are to make sure that ads aren't trying to whitelist themselves, which would be a bad thing.

from adminlte.

r4m3u5 avatar r4m3u5 commented on August 15, 2024

Thanks for clarifying! I suspected it being a kind of "security feature". Quite sure this won't be an issue for 99.9% of users though.
It might even be sufficient to just show an error message that an entry could not be added due to not using pi.hole or the IP address for AdminLTE access.

Cheers
/Jens

from adminlte.

diginc avatar diginc commented on August 15, 2024

I looked into using SERVER_NAME variable to securely verify access but found out it isn't always safe from tampering after some reading (nor is the $HTTP_HOST currently used but I assume its there for non-chrome browsers): https://stackoverflow.com/questions/1459739/php-serverhttp-host-vs-serverserver-name-am-i-understanding-the-ma

That post talks about apache but seems in lighttpd SERVER_NAME inherits from HTTP_HOST also when I tested. I tested this in my NGINX alpine docker container too and it seems to happily report NOTHING when no hostname is set instead of HTTP_HOST. So that's a much better default configuration and would actually make SERVER_NAME safe.

_SERVER["SERVER_NAME"]  no value
vs
_SERVER["HTTP_HOST"]    pihole.diginc.lan

from adminlte.

PromoFaux avatar PromoFaux commented on August 15, 2024

I made a similar suggesting in our slack yesterday that might get around this:

Perhaps we could read the existing host name out, if it is there, and if not, set it to pi.hole as default, with the option of giving the user a chance to set their own
Then we set that in those lines there, and then when they access it with their host name, as they expect to be able to do, it will work?

from adminlte.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.