Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Instead of using routerCtx just escape the url before routing #18086

Commits on Dec 23, 2021

  1. Instead of using routerCtx just escape the url before routing

    A consequence of forcibly setting the RoutePath to the escaped url is that the
    auto routing to endpoints without terminal slashes fails (Causing go-gitea#18060.) This
    failure raises the possibility that forcibly setting the RoutePath causes other
    unexpected behaviours 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 go-gitea#17938
    Fix go-gitea#18060
    Replace go-gitea#18062
    Replace go-gitea#17997
    
    Signed-off-by: Andrew Thornton <art27@cantab.net>
    zeripath committed Dec 23, 2021
    Configuration menu
    Copy the full SHA
    6537838 View commit details
    Browse the repository at this point in the history
  2. Reminder unnecessary test

    zeripath authored Dec 23, 2021
    Configuration menu
    Copy the full SHA
    6909a0f View commit details
    Browse the repository at this point in the history

Commits on Dec 24, 2021

  1. add testcase

    Signed-off-by: Andrew Thornton <art27@cantab.net>
    zeripath committed Dec 24, 2021
    Configuration menu
    Copy the full SHA
    c8d5f5f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9d915db View commit details
    Browse the repository at this point in the history