Details
-
Bug
-
Resolution: Fixed
-
Major
-
2.01
-
None
-
None
-
any
Description
[taken from magnolia-dev, reporter: ]
<<<<
I think I've found a race condition in
info.magnolia.cms.servlets.RequestInterceptor:
--------------------------
public void doGet(HttpServletRequest request, HttpServletResponse
response)
....
private void action() {
String action=this.getRequest().getParameter(EntryServlet.INTERCEPT);
String repository=this.getRequest().getParameter("mgnlRepository");
....
--------------------------
IIRC, servlets are multithreaded. That is, for the webapp there will be
only one instantiated RequestInterceptor object. It's bad practice to use
member variables in servlets, because concurrent requests will overwrite
each others' data and cause all kinds of havoc.
Why aren't the request and response simply passed to the action method as
parameters? Or, why is there even an action method at all, since the only
thing doGet does is call the action method?
This same type of race condition is also present in the SimpleExchange
class (same package).
Thanks for your time,
- jonathan.
>>>>