codeconsole opened a new pull request, #15213:
URL: https://github.com/apache/grails-core/pull/15213

   Currently when a url parameter is specified prior prior to a $format 
parameter, the parameter only consumes everything up until the first dot.   
This results in undesired behavior on sites that's use parameters for usernames 
that include 1 or more periods. 
   
   For instance
   
   "/$controller/$action?/$id?(.$format)?" 
   /user/bob.smith.json  results in controller = 'UserController' id = 'bob'. 
format = 'smith.json'
   
   Syntax:
   
     - "/$id+(.$format)?" - Required id, greedy (splits at last dot)
     - "/$id+?(.$format)?" - Optional id, greedy (splits at last dot)
   
   Examples with this Fix
   
   "/$controller/$action?/$id+?(.$format)?" 
   
     /user/test.test.json  → id=test.test, format=json
     /user/test.json       → id=test, format=json
     /user/foo.bar.baz.xml → id=foo.bar.baz, format=xml
   
   
   "/$controller/$action?/$id?(.$format)?" 
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to