Grails
  1. Grails
  2. GRAILS-6623

Parameters/embedded variables aren't correctly decoded when passing through UrlMappings.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Duplicate
    • Affects Version/s: 1.3.4
    • Fix Version/s: 1.3.5
    • Component/s: Plugins
    • Labels:
      None

      Description

      The space characters in URL mapped parameters/embedded variables are not correctly passed to the controller.
      This worked well in Grails version 1.2.1 but is broken in Grails version 1.3.4.

      UrlMappins.groovy

      class UrlMappings {
      
          static mappings = {
              "/mapIt/$myparam?"(controller:"items", action:"index")
          }
      }
      

      MapItController.groovy

      class MapItController {
      
          def index = {		
              render "$params.myparam"
          }
      }
      
      URL output(1.3.4) expected output(1.2.1)
      /mapIt/Hello+World Hello+World Hello World
      /mapIt/Hello World Hello%20World Hello World
      /mapIt/Hello%20World Hello%20World Hello World

        Issue Links

          Activity

          Hide
          Helga Tauscher added a comment -

          It wasn't broken until 1.3.2 at least.

          Show
          Helga Tauscher added a comment - It wasn't broken until 1.3.2 at least.
          Hide
          Martin Seebach added a comment -

          We're affected by this bug, and very interested in writing and submitting a patch.

          Can you please point us to the relevant (place to write a) test, and whereabouts the fix should go?

          Thanks,
          Martin

          Show
          Martin Seebach added a comment - We're affected by this bug, and very interested in writing and submitting a patch. Can you please point us to the relevant (place to write a) test, and whereabouts the fix should go? Thanks, Martin
          Hide
          Graeme Rocher added a comment -

          This is already fixed, but I have added a functional test:

          http://github.com/grails/grails-functional-tests/commit/f9c1648582b3a814d6ce2b57d5b965ee78fdf8c3

          I believe it is the same regression that caused GRAILS-6729

          Show
          Graeme Rocher added a comment - This is already fixed, but I have added a functional test: http://github.com/grails/grails-functional-tests/commit/f9c1648582b3a814d6ce2b57d5b965ee78fdf8c3 I believe it is the same regression that caused GRAILS-6729

            People

            • Assignee:
              Graeme Rocher
              Reporter:
              Markus Paaso
            • Votes:
              8 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development