url - Grails UrlMappings alphanumeric id -


i managed have string id domain assigned generator, url show/edit /controller/action/alphanumeric_id.

it worked fine till vulnerabilities tests, found problem when id contain slashes (and backslash) when encoded %2f (and %5c) browser gives 400 bad request error.

my mapping default 1 /$controller/$action?/$id? , watched validator constraints see going on, request not arrive there when containing these characters.

if access /controller/action/?id=alphanumeric_id goes well, wonder if there no way continue using default short url.

edit:

  • create new grails application (mine version 2.1.3);
  • create controller;
  • in action println params.id, if want can in urlmapping too;
  • try access controller /appname/controller/action/abc, goes fine;
  • now try /appname/controller/action/a%2fbc or /appname/controller/action/a%5cbc, gives 400 bad request;
  • other combinations %00 upto %ff should work well, not of them does, way, %00 not work.

bugged combinations: %00 %2f %5c


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -