Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major 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))

      { resetToken(request) handler = new ValidResponseHandler(callable?.call()) }
      ......
      }
      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

        There are no comments yet on this issue.

          People

          • Assignee:
            Unassigned
            Reporter:
            Peace Peace
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Last Reviewed:

              Development