publisher: reset substitution sources early on (#6833)
In case of access to an unknown host try_publish() would bail out early with a TraversalError() (404), which would access the publisher known substitution variables to render the error page. That list was not reset yet from the previous call and could thus result in inappropriate variables being created.
This commit is contained in:
parent
96aa0d897c
commit
0096bd61c6
|
@ -511,6 +511,8 @@ class QommonPublisher(Publisher):
|
|||
return False
|
||||
|
||||
def try_publish(self, request):
|
||||
self.substitutions.reset()
|
||||
|
||||
try:
|
||||
self.set_app_dir(request)
|
||||
except ImmediateRedirectException, e:
|
||||
|
@ -577,7 +579,6 @@ class QommonPublisher(Publisher):
|
|||
|
||||
request.language = self.get_site_language()
|
||||
self.install_lang(request.language)
|
||||
self.substitutions.reset()
|
||||
self.substitutions.feed(self)
|
||||
self.substitutions.feed(request)
|
||||
for extra_source in self.extra_sources:
|
||||
|
|
Loading…
Reference in New Issue