You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gitea/modules/context
wxiaoguang 5d77691d42
Improve template system and panic recovery (#24461)
Partially for #24457

Major changes:

1. The old `signedUserNameStringPointerKey` is quite hacky, use
`ctx.Data[SignedUser]` instead
2. Move duplicate code from `Contexter` to `CommonTemplateContextData`
3. Remove incorrect copying&pasting code `ctx.Data["Err_Password"] =
true` in API handlers
4. Use one unique `RenderPanicErrorPage` for panic error page rendering
5. Move `stripSlashesMiddleware` to be the first middleware
6. Install global panic recovery handler, it works for both `install`
and `web`
7. Make `500.tmpl` only depend minimal template functions/variables,
avoid triggering new panics

Screenshot:

<details>

![image](https://user-images.githubusercontent.com/2114189/235444895-cecbabb8-e7dc-4360-a31c-b982d11946a7.png)

</details>
2 years ago
..
access_log.go Improve template system and panic recovery (#24461) 2 years ago
api.go Improve template system and panic recovery (#24461) 2 years ago
api_org.go
api_test.go
captcha.go Add new captcha: cloudflare turnstile (#22369) 2 years ago
context.go Improve template system and panic recovery (#24461) 2 years ago
context_test.go Refactor "route" related code, fix Safari cookie bug (#24330) 2 years ago
csrf.go Refactor cookie (#24107) 2 years ago
form.go
org.go Add missing tabs to org projects page (#22705) 2 years ago
package.go Improve template system and panic recovery (#24461) 2 years ago
pagination.go Make branches list page operations remember current page (#23420) 2 years ago
permission.go Require repo scope for PATs for private repos and basic authentication (#24362) 2 years ago
private.go Improve template system and panic recovery (#24461) 2 years ago
repo.go Refactor `setting.Other` and remove unused `SHOW_FOOTER_BRANDING` (#24270) 2 years ago
response.go
utils.go
xsrf.go
xsrf_test.go