forgejo/routers
zeripath 71e1ebfa60
Instead of using routerCtx just escape the url before routing (#18086) (#18098)
Backport #18086

A consequence of forcibly setting the RoutePath to the escaped url is that the
auto routing to endpoints without terminal slashes fails (Causing #18060.) This
failure raises the possibility that forcibly setting the RoutePath causes other
unexpected behaviors too.

Therefore, instead we should simply pre-escape the URL in the process registering
handler. Then the request URL will be properly escaped for all the following calls.

Fix #17938
Fix #18060
Replace #18062
Replace #17997

Signed-off-by: Andrew Thornton <art27@cantab.net>
2021-12-26 10:32:04 +00:00
..
api/v1 Ensure that git repository is closed before transfer (#18049) (#18057) 2021-12-21 18:27:46 +00:00
common Instead of using routerCtx just escape the url before routing (#18086) (#18098) 2021-12-26 10:32:04 +00:00
install Run Migrate in Install rather than just SyncTables (#17475) (#17486) 2021-10-30 10:28:11 +01:00
private Fix golangci-lint warnings (#17598 et al) (#17668) 2021-11-16 20:38:49 +00:00
utils just add some unit tests (#16291) 2021-06-29 22:00:02 +01:00
web Instead of using routerCtx just escape the url before routing (#18086) (#18098) 2021-12-26 10:32:04 +00:00
init.go Add LRU mem cache implementation (#16226) 2021-07-10 23:54:15 +02:00