summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix 405 method not allowed CORS / OIDC (#28583) (#28586)Giteabot2023-12-221-0/+2
| | | | | | | | | | Backport #28583 by @morphelinho Follow #28184 Follow #28515 Fix problem with 405 method not allowed for CORS wrt OIDC Co-authored-by: morphelinho <morphelinho@users.noreply.github.com>
* Fix 500 error of searching commits (#28576) (#28579)Giteabot2023-12-222-2/+2
| | | | | | | | | | Backport #28576 by wxiaoguang Regression of #28454 . Now the string is escaped HTML, so it doesn't need `| Safe`. Fix #28575 Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* improve possible performance bottleneck (#28547) (#28578)Giteabot2023-12-211-8/+3
| | | | | | | Backport #28547 by @lunny Replace #28500 Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Use information from previous blame parts (#28572) (#28577)Giteabot2023-12-221-5/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport #28572 by @KN4CK3R Fixes #28545 `git blame` output can contain blocks without commit information if it was outputted before (the `0dafa97ea3f6d9662299579e5be1875cd28baaae 48 26 1` line): ``` fec25436488499df7231f63b857f66457c193d5c 24 25 1 author Bastien Montagne author-mail <bastien@blender.org> author-time 1660731031 author-tz +0200 committer Bastien Montagne committer-mail <bastien@blender.org> committer-time 1660731031 committer-tz +0200 summary LibOverride: Add Make/Reset/Clear entries to IDTemplate contextual menu. previous 839ece6477203382b7a7483062961540180ff1cd source/blender/editors/interface/interface_ops.c filename source/blender/editors/interface/interface_ops.c #include "BLT_translation.h" 0dafa97ea3f6d9662299579e5be1875cd28baaae 48 26 1 3d57bc4397fca53bc9702a27bbf50102827829b0 27 27 1 author Hans Goudey author-mail <hans@blender.org> author-time 1700131315 author-tz +0100 committer Hans Goudey committer-mail <hooglyboogly@noreply.localhost> committer-time 1700131315 committer-tz +0100 summary Cleanup: Move several blenkernel headers to C++ previous 451c054d9b7d3148a646caa5a72fb127a5b5c408 source/blender/editors/interface/interface_ops.cc filename source/blender/editors/interface/interface_ops.cc #include "BKE_context.hh" ``` This PR reuses data from the previous blame part to fill these gaps. Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
* Update mermaid for 1.21 (#28571)wxiaoguang2023-12-212-5/+5
| | | Try to fix #28170
* Add changelog for 1.21.3 (#28569)v1.21.3Lunny Xiao2023-12-211-0/+28
|
* Fix merging artifact chunks error when minio storage basepath is set ↵Giteabot2023-12-211-4/+9
| | | | | | | | | | | | | | | | | | (#28555) (#28568) Backport #28555 by @fuxiaohei Related to https://github.com/go-gitea/gitea/issues/28279 When merging artifact chunks, it lists chunks from storage. When storage is minio, chunk's path contains `MINIO_BASE_PATH` that makes merging break. <del>So trim the `MINIO_BASE_PATH` when handle chunks.</del> Update the chunk file's basename to retain necessary information. It ensures that the directory in the chunk's path remains unaffected. Co-authored-by: FuXiaoHei <fuxiaohei@vip.qq.com>
* Update actions document about comparsion as Github Actions (#28560) (#28564)Giteabot2023-12-202-0/+16
| | | | | Backport #28560 by @lunny Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Fix inperformant query on retrifing review from database. (#28552) (#28562)Giteabot2023-12-201-8/+10
| | | | | | | | | | | Backport #28552 by @6543 can we please PLEAS PLEASE only use raw SQL statements if it is relay needed!!! source is https://github.com/go-gitea/gitea/pull/28544 (before refactoring) Co-authored-by: 6543 <m.huber@kithara.com>
* Fix the issue ref rendering for wiki (#28556) (#28559)Giteabot2023-12-201-1/+3
| | | | | | | | Backport #28556 by wxiaoguang Fix #28526, regression of * #26365 Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix duplicate ID when deleting repo (#28520) (#28528)Giteabot2023-12-192-4/+4
| | | | | | | | | | | | | | | | | | | Backport #28520 by @framitdavid There is an accessibility issue in the interface when attempting to delete a repository. When I click on "Delete repository," a dialog box appears, requiring confirmation to proceed with the repository deletion. However, when I press the "Repo name" label, the wrong input field gains focus. The focused field is located behind the dialog and is intended for renaming the repository. I am submitting these pull requests to ensure that the correct input field is focused when the user clicks on the label. This change will also facilitate the writing of tests using Playwright or Testing Library to retrieve elements based on roles. This PR will also improve acessibility of this area. Co-authored-by: David Øvrelid <46874830+framitdavid@users.noreply.github.com>
* Only check online runner when detecting matching runners in workflows ↵Giteabot2023-12-193-4/+19
| | | | | | | | | | | | | | | | | (#28286) (#28512) Backport #28286 by @yp05327 Mentioned: [#28277](https://github.com/go-gitea/gitea/issues/28277#issuecomment-1831325276) We should only check online runner when detecting matching runners in workflows, as if runner is not online, the workflow will not run. ![image](https://github.com/go-gitea/gitea/assets/18380374/11855e9d-7241-4b7a-b8d7-49dbb94ba1c5) Co-authored-by: yp05327 <576951401@qq.com>
* chore(api): support ignore password if login source type is LDAP for ↵Giteabot2023-12-193-16/+24
| | | | | | | | | | | | | creating user API (#28491) (#28525) Backport #28491 by @appleboy - Modify the `Password` field in `CreateUserOption` struct to remove the `Required` tag - Update the `v1_json.tmpl` template to include the `email` field and remove the `password` field Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com> Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com>
* Update golang.org/x/crypto (#28519)wxiaoguang2023-12-192-10/+11
| | | | ref: https://groups.google.com/g/golang-announce/c/qA3XtxvMUyg, CVE-2023-48795, https://go.dev/issue/64784
* Improve the prompt for "ssh-keygen sign" (#28509) (#28510)Giteabot2023-12-181-1/+1
| | | | | | | Backport #28509 by wxiaoguang Close #28505 Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Add option to disable ambiguous unicode characters detection (#28454) (#28499)wxiaoguang2023-12-1817-146/+110
| | | | | | | | Backport #28454 (the only conflict is caused by some comments) * Close #24483 * Close #28123 * Close #23682 * Close #23149
* Initalize stroage for orphaned repository doctor (#28487) (#28490)Giteabot2023-12-161-0/+5
| | | | | | | | | | | | | Backport #28487 by @earl-warren - When a repository is orphaned and has objects stored in any of the storages such as repository avatar or attachments the delete function would error, because the storage module wasn't initalized. - Add code to initialize the storage module. Refs: https://codeberg.org/forgejo/forgejo/pulls/1954 Co-authored-by: Earl Warren <109468362+earl-warren@users.noreply.github.com> Co-authored-by: Gusted <postmaster@gusted.xyz>
* Update docs for DISABLE_QUERY_AUTH_TOKEN (#28485) (#28488)Giteabot2023-12-161-0/+1
| | | | | | | | Backport #28485 by @kdumontnu As described [here](https://github.com/go-gitea/gitea/pull/28390#issuecomment-1857553331). Co-authored-by: Kyle D <kdumontnu@gmail.com>
* Refactor SSH clone URL generation code (#28421) (#28480)Giteabot2023-12-152-13/+42
| | | | | | | Backport #28421 by wxiaoguang Refactor the code and add tests, keep the old logic. Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Polyfill SubmitEvent for PaleMoon (#28441) (#28478)Giteabot2023-12-156-7/+31
| | | | | | | | | | Backport #28441 by wxiaoguang Fix #28319 It only polyfills if there is no "SubmitEvent" class, so it has no side effect for most users. Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix Chinese translation of config cheat sheet[API] (#28472) (#28473)Giteabot2023-12-151-4/+5
| | | | | Backport #28472 by @CaiCandong Co-authored-by: CaiCandong <50507092+CaiCandong@users.noreply.github.com>
* Fix documents for "custom/public/assets/" (#28465) (#28467)Giteabot2023-12-145-8/+8
| | | | | | | Backport #28465 by wxiaoguang Fix #28463 Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Retry SSH key verification with additional CRLF if it failed (#28392) (#28464)Giteabot2023-12-141-4/+9
| | | | | | | | | | | Backport #28392 by @nekrondev Windows-based shells will add a CRLF when piping the token into ssh-keygen command resulting in verification error. This resolves #21527. Co-authored-by: nekrondev <heiko@noordsee.de> Co-authored-by: Heiko Besemann <heiko.besemann@qbeyond.de> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Add endpoint for not implemented Docker auth (#28457) (#28462)Giteabot2023-12-132-1/+15
| | | | | | | | | | | | | | Backport #28457 by @KN4CK3R Recently Docker started to use the optional `POST /v2/token` endpoint which should respond with a `404 Not Found` status code instead of the current `405 Method Not Allowed`. > Note: Not all token servers implement oauth2. If the request to the endpoint returns 404 using the HTTP POST method, refer to Token Documentation for using the HTTP GET method supported by all token servers. Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
* Fix possible nil pointer access (#28428) (#28440)Giteabot2023-12-124-28/+14
| | | | | | | | Backport #28428 by @KN4CK3R There could be a nil pointer exception if the file is not found because that specific error is suppressed but not handled. Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
* Don't show unnecessary citation JS error on UI (#28433) (#28437)Giteabot2023-12-121-4/+11
| | | | | | | Backport #28433 by wxiaoguang Fix #28226 Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* 1.21.2 changelog (#28387)v1.21.2techknowlogick2023-12-121-0/+39
| | | | | | | | To be rebuilt with latest golang version --------- Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Do some missing checks (#28423) (#28432)Lunny Xiao2023-12-123-3/+62
| | | backport #28423
* Deprecate query string auth tokens (#28390) (#28430)Giteabot2023-12-125-7/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport #28390 by @jackHay22 ## Changes - Add deprecation warning to `Token` and `AccessToken` authentication methods in swagger. - Add deprecation warning header to API response. Example: ``` HTTP/1.1 200 OK ... Warning: token and access_token API authentication is deprecated ... ``` - Add setting `DISABLE_QUERY_AUTH_TOKEN` to reject query string auth tokens entirely. Default is `false` ## Next steps - `DISABLE_QUERY_AUTH_TOKEN` should be true in a subsequent release and the methods should be removed in swagger - `DISABLE_QUERY_AUTH_TOKEN` should be removed and the implementation of the auth methods in question should be removed ## Open questions - Should there be further changes to the swagger documentation? Deprecation is not yet supported for security definitions (coming in [OpenAPI Spec version 3.2.0](https://github.com/OAI/OpenAPI-Specification/issues/2506)) - Should the API router logger sanitize urls that use `token` or `access_token`? (This is obviously an insufficient solution on its own) Co-authored-by: Jack Hay <jack@allspice.io> Co-authored-by: delvh <dev.lh@web.de>
* Recover from panic in cron task (#28409) (#28425)Giteabot2023-12-121-5/+7
| | | | | | | | | | | | | | | | | Backport #28409 by @earl-warren - Currently there's code to recover gracefully from panics that happen within the execution of cron tasks. However this recover code wasn't being run, because `RunWithShutdownContext` also contains code to recover from any panic and then gracefully shutdown Forgejo. Because `RunWithShutdownContext` registers that code as last, that would get run first which in this case is not behavior that we want. - Move the recover code to inside the function, so that is run first before `RunWithShutdownContext`'s recover code (which is now a noop). Fixes: https://codeberg.org/forgejo/forgejo/issues/1910 Co-authored-by: Earl Warren <109468362+earl-warren@users.noreply.github.com> Co-authored-by: Gusted <postmaster@gusted.xyz>
* Improve doctor cli behavior (#28422) (#28424)Giteabot2023-12-113-34/+66
| | | | | | | | | | Backport #28422 by wxiaoguang 1. Do not sort the "checks" slice again and again when "Register", it just wastes CPU when the Gitea instance runs 2. If a check doesn't exist, tell the end user 3. Add some tests Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix links in docs (#28302) (#28418)Giteabot2023-12-115-10/+6
| | | | | | | | | | | | | Backport #28302 by @yp05327 Close #28287 ## How to test it in local convert Makefile L34 into: ``` cd .tmp/upstream-docs && git clean -f && git reset --hard && git fetch origin pull/28302/head:pr28302 && git switch pr28302 ``` Co-authored-by: yp05327 <576951401@qq.com>
* Also sync DB branches on push if necessary (#28361) (#28403)Lunny Xiao2023-12-1112-69/+148
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fix #28056 Backport #28361 This PR will check whether the repo has zero branch when pushing a branch. If that, it means this repository hasn't been synced. The reason caused that is after user upgrade from v1.20 -> v1.21, he just push branches without visit the repository user interface. Because all repositories routers will check whether a branches sync is necessary but push has not such check. For every repository, it has two states, synced or not synced. If there is zero branch for a repository, then it will be assumed as non-sync state. Otherwise, it's synced state. So if we think it's synced, we just need to update branch/insert new branch. Otherwise do a full sync. So that, for every push, there will be almost no extra load added. It's high performance than yours. For the implementation, we in fact will try to update the branch first, if updated success with affect records > 0, then all are done. Because that means the branch has been in the database. If no record is affected, that means the branch does not exist in database. So there are two possibilities. One is this is a new branch, then we just need to insert the record. Another is the branches haven't been synced, then we need to sync all the branches into database.
* Fix missing check (#28406) (#28411)Giteabot2023-12-112-4/+24
| | | | | Backport #28406 by @lunny Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* enable system users search via the API (#28013) (#28018)Giteabot2023-12-083-12/+49
| | | | | | | | | | | | Backport #28013 by @earl-warren Refs: https://codeberg.org/forgejo/forgejo/issues/1403 (cherry picked from commit dd4d17c159eaf8b642aa9e6105b0532e25972bb7) --------- Co-authored-by: Earl Warren <109468362+earl-warren@users.noreply.github.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Fix Docker meta action for releases (#28232) (#28395)Giteabot2023-12-072-3/+4
|
* Make gogit Repository.GetBranchNames consistent (#28348) (#28386)Giteabot2023-12-071-13/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport #28348 by @AdamMajer nogogit GetBranchNames() lists branches sorted in reverse commit date order. On the other hand the gogit implementation doesn't apply any ordering resulting in unpredictable behaviour. In my case, the unit tests requiring particular order fail repo_branch_test.go:24: Error Trace: ./gitea/modules/git/repo_branch_test.go:24 Error: elements differ extra elements in list A: ([]interface {}) (len=1) { (string) (len=6) "master" } extra elements in list B: ([]interface {}) (len=1) { (string) (len=7) "branch1" } listA: ([]string) (len=2) { (string) (len=6) "master", (string) (len=7) "branch2" } listB: ([]string) (len=2) { (string) (len=7) "branch1", (string) (len=7) "branch2" } Test: TestRepository_GetBranches To fix this, we sort branches based on their commit date in gogit implementation. Fixes: #28318 Co-authored-by: Adam Majer <amajer@suse.de>
* Fix margin in server signed signature verification view (#28379) (#28381)Giteabot2023-12-071-1/+1
| | | | | | | | | | | | | Backport #28379 by @lafriks Before: ![image](https://github.com/go-gitea/gitea/assets/165205/e2e2256d-03c5-4ab8-8ed9-08ef68571a43) After: ![image](https://github.com/go-gitea/gitea/assets/165205/804132ef-18f9-4ab8-949d-f6c71e7f4d24) Co-authored-by: Lauris BH <lauris@nix.lv>
* Fix object does not exist error when checking citation file (#28314) (#28369)Giteabot2023-12-061-13/+6
| | | | | | | | | | | Backport #28314 by @yp05327 Fix #28264 `DataAsync()` will be called twice. Caused by https://github.com/go-gitea/gitea/pull/27958. I'm sorry, I didn't completely remove all unnecessary codes. Co-authored-by: yp05327 <576951401@qq.com>
* Fix incorrect default value of `[attachment].MAX_SIZE` (#28373) (#28376)Giteabot2023-12-061-1/+1
| | | | | | | | | Backport #28373 by @capvor In the documents, the `[attachment] MAX_SIZE` default value should be 4. Reference the source code `modules/setting/attachment.go` line 29. Co-authored-by: capvor <capvor@sina.com>
* Use `filepath` instead of `path` to create SQLite3 database file (#28374) ↵Giteabot2023-12-061-2/+1
| | | | | | | (#28378) Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Fix #28300
* Fix the runs will not be displayed bug when the main branch have no ↵Giteabot2023-12-062-1/+2
| | | | | | | | | | | | | | workflows but other branches have (#28359) (#28365) Backport #28359 by @lunny The left menu will only display the default branch's workflows but the right side will display the runs triggered by all branches' workflows. So we cannot hide right side if default branch has no workflows. Fix #28332 Replace #28333 Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* handle repository.size column being NULL in migration v263 (#28336) (#28363)Giteabot2023-12-051-1/+6
| | | | Co-authored-by: Nate Levesque <nate@thenaterhood.com>
* Convert git commit summary to valid UTF8. (#28356) (#28358)Giteabot2023-12-051-1/+2
| | | | | | | | | | | Backport #28356 by @darrinsmart The summary string ends up in the database, and (at least) MySQL & PostgreSQL require valid UTF8 strings. Fixes #28178 Co-authored-by: darrinsmart <darrin@djs.to> Co-authored-by: Darrin Smart <darrin@filmlight.ltd.uk>
* Fix migration panic due to an empty review comment diff (#28334) (#28362)Giteabot2023-12-051-1/+1
| | | | | | | | | | | | | | | | | | | | | Backport #28334 by @lng2020 Fix #28328 ``` func (p *PullRequestComment) GetDiffHunk() string { if p == nil || p.DiffHunk == nil { return "" } return *p.DiffHunk } ``` This function in the package `go-github` may return an empty diff. When it's empty, the following code will panic because it access `ss[1]` https://github.com/go-gitea/gitea/blob/ec1feedbf582b05b6a5e8c59fb2457f25d053ba2/services/migrations/gitea_uploader.go#L861-L867 https://github.com/go-gitea/gitea/blob/ec1feedbf582b05b6a5e8c59fb2457f25d053ba2/modules/git/diff.go#L97-L101 Co-authored-by: Nanguan Lin <70063547+lng2020@users.noreply.github.com>
* Add `HEAD` support for rpm repo files (#28309) (#28360)Giteabot2023-12-053-2/+35
| | | | | | | | | | | | | | | Backport #28309 by @KN4CK3R Fixes https://codeberg.org/forgejo/forgejo/issues/1810 zypper uses HEAD requests to check file existence. https://github.com/openSUSE/libzypp/blob/HEAD/zypp/RepoManager.cc#L2549 https://github.com/openSUSE/libzypp/blob/HEAD/zypp-curl/ng/network/private/downloaderstates/basicdownloader_p.cc#L116 @ExplodingDragon fyi Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
* Refactor template empty checks (#28351) (#28354)Giteabot2023-12-0511-23/+23
| | | | | | | | | | | | Backport #28351 by @KN4CK3R Fix #28347 As there is no info how to reproduce it, I can't test it. Fix may be `section_split.tmpl @ 126/130`. Other changes are "empty check" refactorings. Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
* Fix RPM/Debian signature key creation (#28352) (#28353)Giteabot2023-12-052-4/+3
| | | | | | | | | | | Backport #28352 by @KN4CK3R Fixes #28324 The name parameter can't contain some characters (https://github.com/keybase/go-crypto/blob/master/openpgp/keys.go#L680) but is optional. Therefore just use an empty string. Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
* Keep profile tab when clicking on Language (#28320) (#28331)Giteabot2023-12-031-1/+1
| | | | | | | Backport #28320 by @JakobDev Fixes https://codeberg.org/Codeberg/Community/issues/1355 Co-authored-by: JakobDev <jakobdev@gmx.de>
* Fix missing issue search index update when changing status (#28325) (#28330)Giteabot2023-12-031-0/+22
| | | | | | | | | Backport #28325 by @brechtvl Changing an issue status, assignee, labels or milestone without also adding a comment would not update the index, resulting in wrong search results. Co-authored-by: Brecht Van Lommel <brecht@blender.org>