-
Notifications
You must be signed in to change notification settings - Fork 17
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
User domains checking is broken #99
Comments
Zope has nothing to do with how your browser resolves |
I have moved the issue to the package that contains the code that does the checking against the "domains" attribute. First of all, that code has seen no changes in 3 years, so there is no "deliberate change" involved at all. The change may have to do with your move from Python 2 to Python 3 and how that interacts with the machine network libraries to resolve names, Zope (and AccessControl) have nothing to do with that. Secondly, after looking at the code that uses this For your particular case I suggest you change the Other than that I would consider that feature broken for use cases that use host names instead of IP adresses (because those could resolve to IPv6) and use cases that involve IPv6 at all. |
Thank you for the clarification, I'll just use 127.0.0.1. The feature itself is an important security feature for me, please do not remove it :) |
Georg Pfolz wrote at 2020-5-10 06:09 -0700:
I used to have a System-user for my Zope instances accessible only on Domain 'localhost'. This does not seem to work anymore (Zope 4.4, Python 3.8). But using 127.0.0.1 instead of localhost did the trick. Is this a deliberate change?
I think this is a bug in "waitress" (the http server where Zope now typically
runs in (instead of `ZServer`)).
The domain checking code requires that the CGI variable `REMOTE_HOST` contains
the host name with which the server was accessed
(and `Remote_ADDR` the corresponding address).
With the new (`waitress`) environment, both `REMOTE_HOST` and `REMOTE_ADDR`
contain the same value: the address; the host name information is lost.
|
I could have guessed as the major change that came with switching to Python 3 was that I no longer could use ZServer. Thank you for the clarification. |
Apparently, Note, however, that domain restrictions (whether via address or name) are reliable only when you access Zope's web server directly. When you have a front end web server (as it is often the case in production environments), then If you must rely on domain restrictions, I recommend to use features from |
Ok, good to know. I'm using this feature with IP-addresses anyway, except for 'localhost' until now :) |
Georg Pfolz wrote at 2020-5-12 03:31 -0700:
Ok, good to know. I'm using this feature with IP-addresses anyway, except for 'localhost' until now :)
IP addresses are only reliable when you access Zope directly.
The information which arrives at Zope identifies always the last
HTTP agent. If you have a front end web server, then it identifies
this web server (not the real client).
|
I used to have a System-user for my Zope instances accessible only on Domain 'localhost'. This does not seem to work anymore (Zope 4.4, Python 3.8). But using 127.0.0.1 instead of localhost did the trick. Is this a deliberate change?
The text was updated successfully, but these errors were encountered: