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%2fbcor/appname/controller/action/a%5cbc, gives 400 bad request; - other combinations
%00upto%ffshould work well, not of them does, way,%00not work.
bugged combinations: %00 %2f %5c
Comments
Post a Comment