Ensure hostname blacklisting correctly determines incoming hostname #7

Merged
merged 1 commit into from Dec 6, 2012

Projects

None yet

2 participants

@davidjb
Member
davidjb commented Sep 26, 2012

At present, plone.app.theming relies on BASE1 from the request object in order to attempt to ascertain the hostname of the request. These BASEx variables encompass the path to a Plone site/Zope install -- and are problematic when a site is hosted on a sub-directory (or sub-sub-directory, etc). Since BASE1 contains a path, this isn't necessarily going to be just the server URL.

Looking at the ZPublisher, SERVER_URL is built up from the relevant CGI-style environment variables and should be value used.

@garbas garbas commented on an outdated diff Dec 6, 2012
src/plone/app/theming/tests/test_utils.py
@@ -108,6 +108,44 @@ def test_applyTheme_None(self):
self.assertEqual(settings.absolutePrefix, None)
self.assertEqual(settings.parameterExpressions, {})
+ def test_istThemeEnabled(self):
@garbas
garbas Dec 6, 2012 Contributor

ist? :)

@garbas
Contributor
garbas commented Dec 6, 2012

@davidjb
can you get this pull request up to date with master?

@davidjb
Member
davidjb commented Dec 6, 2012

@garbas Done. Rebased with master and annoying typo fixed.

@garbas garbas merged commit 084cb1e into master Dec 6, 2012

1 check failed

default The Travis build failed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment