Commits at 81b5bef55a10c59e43987ad4df291b104c69d771
81b5bef5Prevent start panic due to missing DotEscape function
Unfortunately #19169 causing a panic at startup in prod mode. This was hidden by dev
mode because the templates are compiled dynamically there. The issue is that DotEscape
is not in the original FuncMap at the time of compilation which causes a panic.
Ref #19169
Signed-off-by: Andrew Thornton <art27@cantab.net>
Andrew Thornton
authored at
Andrew Thornton
comitted at
0eff23daFix compare link in active feeds for new branch (#19149)
When a new branch is pushed the old SHA is always listed as the empty sha and thus the compare link that is created does not work correctly.
Therefore when creating the compare link for new branches:
1. Attempt to get the parent of the first commit and use that as the basis
for the compare link.
2. If this is not possible make a comparison to the default branch
3. Finally if that is not possible simply do not show a compare link.
However, there are multiple broken compare links remaining therefore, in order for these to not break we will simply make the compare link redirect to the default branch.
Fix #19144
Signed-off-by: a1012112796 <1012112796@qq.com>
Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: Andrew Thornton <art27@cantab.net>a1012112796
authored at
GitHub
comitted at
d8f57841Redirect .wiki/* ui link to /wiki (#18831)
Redirect .wiki/* ui link to /wiki
fix #18590
Signed-off-by: a1012112796 <1012112796@qq.com>
Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: Andrew Thornton <art27@cantab.net>a1012112796
authored at
GitHub
comitted at
5248232cTry to prevent autolinking of displaynames by email readers (#19169)
Unfortunately many email readers will (helpfully) detect url or url-like names and
automatically create links to them, even in HTML emails. This is not ideal when
usernames can have dots in them.
This PR tries to prevent this behaviour by sticking ZWJ characters between dots and
also set the meta tag to prevent format detection.
Not every email template has been changed in this way - just the activation emails but
it may be that we should be setting the above meta tag in all of our emails too.
Signed-off-by: Andrew Thornton <art27@cantab.net>
zeripath
authored at
GitHub
comitted at
3f280f89Update HTTP status codes to modern codes (#18063)
* 2xx/3xx/4xx/5xx -> http.Status...
* http.StatusFound -> http.StatusTemporaryRedirect
* http.StatusMovedPermanently -> http.StatusPermanentRedirect
KN4CK3R
authored at
GitHub
comitted at
395117d3Remove the Go version in UI, add a link on Gitea Version to show config details (Go/Git version) (#19173)
This PR mainly helps maintainers to save time from asking the issue reporters to get the correct version.
There are so many reporters that have difficulty to get the correct Gitea version. Some of they just report Go version.
The Go version doesn't help debug except in very limited circumstances. Instead, there is a new link on the Gitea version, the link is for the admin/config page which shows all version information, including Gitea, Go, Git, it could help more.wxiaoguang
authored at
GitHub
comitted at
3f71ab9aClean paths when looking in Storage (#19124)
* Clean paths when looking in Storage
Ensure paths are clean for minio aswell as local storage.
Use url.Path not RequestURI/EscapedPath in storageHandler.
Signed-off-by: Andrew Thornton <art27@cantab.net>
* Apply suggestions from code review
Co-authored-by: Lauris BH <lauris@nix.lv>zeripath
authored at
GitHub
comitted at
d2c16581Use the new/choose link for New Issue on project page (#19172)
Extend issues/new/choose to pass the project id and change New Issue
link on project page to use new/choose
Fix #19170
Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>zeripath
authored at
GitHub
comitted at
461068cfEnsure that setting.LocalURL always has a trailing slash (#19171)
Fix #19166
Signed-off-by: Andrew Thornton <art27@cantab.net>zeripath
authored at
GitHub
comitted at
7a550b3aUse `ctx` instead of `db.DefaultContext` in some packages(routers/services/modules) (#19163)
* Remove `db.DefaultContext` usage in routers, use `ctx` directly
* Use `ctx` directly if there is one, remove some `db.DefaultContext` in `services`
* Use ctx instead of db.DefaultContext for `cmd` and some `modules` packages
* fix incorrect context usage
wxiaoguang
authored at
GitHub
comitted at
2b55422cFix the bug: deploy key with write access can not push (#19010)
Use DeployKeyID to replace the IsDeployKey, then CanWriteCode uses the DeployKeyID to check the write permission.wxiaoguang
authored at
GitHub
comitted at
80fd2552Renamed ctx.User to ctx.Doer. (#19161)
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>KN4CK3R
authored at
GitHub
comitted at
5495ba76[docs] Enhance container selection in docker dump (#14292)
* Enhance container selection in docker dump
The problem with the previous query was, that it sometimes selected multiple containers, which make the command file with a hard to understand message. Now, use '^...$' to make sure a regex full match.
Robin
authored at
GitHub
comitted at
77d1c7bfCleanup protected branches when deleting users & teams (#19158)
* Clean up protected_branches when deleting user
fixes #19094
* Clean up protected_branches when deleting teams
* fix issue
Co-authored-by: Lauris BH <lauris@nix.lv>Norwin
authored at
GitHub
comitted at
bfe2e3d5Reorder issue templates and automatically add labels (#18875)
* Reorder bug-report.yaml
* Add bug label on bug-report.yaml
* Add feature label on feature-request.yaml
* Reorder ui.bug-report.yaml
* Apply suggestions
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: zeripath <art27@cantab.net>delvh
authored at
GitHub
comitted at
b05b4018Use IterateBufferSize whilst querying repositories during adoption check (#19140)
The adoption page checks directories to see if they are repositories by querying the
db on a per user basis. This can lead to problems if a user has a large number of
repositories or putative repositories.
This PR changes the buffering to check the db in IterataeBufferSize batches instead.
Fix #19137
Signed-off-by: Andrew Thornton <art27@cantab.net>zeripath
authored at
GitHub
comitted at
49c5fc56Fix NPE `/repos/issues/search` when not signed in (#19154)
- Don't panic when on
`/repos/issues/search?{created,assigned,mentioned,review_requested}=true`
when client didn't pass any authentication.
- Resolves #19115Gusted
authored at
GitHub
comitted at
f96e8be4Use custom favicon when viewing static files if it exists (#19130)
Redirect `/favicon.ico` to `/assets/img/favicon.png`.
Fix #19109 Abheek Dhawan
authored at
GitHub
comitted at
3322f4d7not send notification emails to inactive users (part 2) (#19142)
Unfortunately fixing changes to `mail_issue.go` did not get included in #19131.
We also need to not send issue comment mails to deactivated users.
Fix #18950
Signed-off-by: Andrew Thornton <art27@cantab.net>zeripath
authored at
GitHub
comitted at
2d21d2afMake migrations SKIP_TLS_VERIFY apply to git too (#19132)
Make SKIP_TLS_VERIFY apply to git data migrations too through adding the `-c http.sslVerify=false` option to the git clone command.
Fix #18998
Signed-off-by: Andrew Thornton <art27@cantab.net>
zeripath
authored at
GitHub
comitted at
fb08d2b3Do not send notification emails to inactive users (#19131)
Emails should not be sent to inactive users except for Activate and ResetPassword
messages.
Fix #18950
Signed-off-by: Andrew Thornton <art27@cantab.net>zeripath
authored at
GitHub
comitted at
fda5b9fcAdd warning to set SENDMAIL_ARGS to -- (#19102)
Even with #17688 email addresses that contain an initial `-` may still be present in the db and it may in future still be possible to imagine a situation whereby initial `-` are repermitted.
This PR simply updates the documentation to warn users to set their SENDMAIL_ARGS with a terminal `--` to prevent this possibility email addresses being interpreted as options.
Signed-off-by: Andrew Thornton <art27@cantab.net>zeripath
authored at
GitHub
comitted at
7fc5fd64Do not send activation email if manual confirm is set (#19119)
If the mailer is configured then even if Manual confirm is set an activation email
is still being sent because `handleUserCreated` is not checking for this case.
Fix #17263
Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>zeripath
authored at
GitHub
comitted at
929b07feUpdate tool dependencies (#19120)
- Use tag over hash for all tool dependencies
- Update them to latest released versionssilverwind
authored at
GitHub
comitted at
04fcf23eDelete related notifications on issue deletion too (#18953)
* use .Decr for issue comment counting
* Remove notification on issue removalOtto Richter (fnetX)
authored at
GitHub
comitted at