You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wsrp4j-user@portals.apache.org by Laurent Michenaud <lm...@adeuza.fr> on 2006/07/31 15:10:00 UTC
synchronization issue in the proxy portlet
I think there is a synchronization issue in the proxy portlet.
In the ProxyPortlet.java, in the render method, the url generator
is well synchronized :
synchronized (urlGenLock) {
// update url generator
URLGenerator urlGenerator =
URLGeneratorImpl.getInstance(renderResponse,
getPortletConfig());
URLTemplateComposer templateComposer =
consumerEnv.getTemplateComposer();
if(templateComposer != null) {
templateComposer.setURLGenerator(urlGenerator);
}
consumerEnv.getURLRewriter().setURLGenerator(urlGenerator);
}
It is needed because the url generator needs the current renderResponse.
But i think it is not enough.
The URLGenerator( the same instance ) is then used after getting the markup ( in the
PortletDriverImpl.java, method getMarkup() ) :
URLRewriter urlRewriter = consumerEnv.getURLRewriter();
String rewrittenMarkup = urlRewriter.rewriteURLs(response.getMarkupContext()
.getMarkupString());
So, a user A can modify the URLGenerator with it response, just before
a user B rewrites the URL in the markup.
Am i wrong ?
<http://www.adeuza.fr/> Laurent MICHENAUD
Intégrateur Web
lmichenaud@adeuza.fr <ma...@adeuza.fr> <http://www.movalys.fr/>
<http://www.adeuzaservice.fr/>