webmcp
diff framework/env/request/default_router.lua @ 358:545ec2e3eafa
Code cleanup in request.handler(...) and request.default_router(...)
author | jbe |
---|---|
date | Thu Mar 26 20:19:54 2015 +0100 (2015-03-26) |
parents | 169dfbd0246a |
children | 32b79658e5ae |
line diff
1.1 --- a/framework/env/request/default_router.lua Thu Mar 26 20:09:13 2015 +0100 1.2 +++ b/framework/env/request/default_router.lua Thu Mar 26 20:19:54 2015 +0100 1.3 @@ -17,15 +17,7 @@ 1.4 end 1.5 local static = string.match(path, "^static/([-./0-9A-Z_a-z]*)$") 1.6 if static then 1.7 - -- TODO: move sanitizer to request.handler(...) 1.8 - if string.match(static, "^/") or string.match(static, "//") then 1.9 - return nil 1.10 - end 1.11 - for element in string.gmatch(static, "[^/]+") do 1.12 - if element == "." or element == ".." then 1.13 - return nil 1.14 - end 1.15 - end 1.16 + -- Note: sanitizer is in request.handler(...) 1.17 return {static = static} 1.18 end 1.19 local module, action, view, id, suffix