Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 1.2.1, 1.3.7
-
Fix Version/s: None
-
Component/s: Controllers
-
Labels:
-
Environment:Grails 1.2.1 ~ Grails 1.3.7
Description
I found that the withForm did not work in my project sometimes, then I read the resource code of Grails, I found that there was a bug in the file WithFormMethod.groovy,
TokenResponseHandler withForm(HttpServletRequest request, Closure callable) {
TokenResponseHandler handler
if (isTokenValid(request))
......
}
the isTokenValid(request) and resetToken(request) are not in the same synchronized block
change into:
TokenResponseHandler withForm(HttpServletRequest request, Closure callable) {
TokenResponseHandler handler
synchronized(this){
if (isTokenValid(request)) { resetToken(request) handler = new ValidResponseHandler(callable?.call()) }
......
}
and remove the "synchronized" in method isTokenValid and resetToken
Activity
- All
- Comments
- Work Log
- History
- Activity
- Git Commits