aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Case-insensitive NuGet symbol file GUID (#21409) (#21575)Hubert Wawrzyńczyk2022-10-243-3/+3
| | | | | | Backport of #21409 Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Prevent Authorization header for presigned LFS urls (#21531) (#21569)KN4CK3R2022-10-241-2/+9
| | | | | Backport of #21531 Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Update binding to fix bugs (#21560)Lunny Xiao2022-10-242-3/+3
| | | backport #21556, Fix #19698
* Check for valid user token in integration tests (#21520) (#21529)silverwind2022-10-221-2/+3
| | | | | | | | | | Backport #21520 Added checks for logged user token. Some builds fail at unrelated tests, due to missing token. Co-authored-by: Vladimir Yakovlev <nagos@inbox.ru> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix generating compare link (#21519) (#21530)Lunny Xiao2022-10-212-1/+14
| | | | | | | Fix #6318, backport #21519 Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: zeripath <art27@cantab.net>
* Ignore error when retrieving changed PR review files (#21487) (#21524)delvh2022-10-201-1/+6
| | | | | | | | | | | | | | When a PR reviewer reviewed a file on a commit that was later gc'ed, they would always get a `500` response from then on when loading the PR. This PR simply ignores that error and instead marks all files as unchanged. This approach was chosen as the only feasible option without diving into **a lot** of error handling. Fixes #21392 Backport of #21487 Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Enable Monaco automaticLayout (#21516)silverwind2022-10-191-0/+1
| | | | | | | Enable [`automaticLayout`](https://microsoft.github.io/monaco-editor/api/interfaces/monaco.editor.IDiffEditorOptions.html#automaticLayout) for monaco so it can reflow itself. Fixes: https://github.com/go-gitea/gitea/issues/21508
* Fix incorrect notification commit url (#21479) (#21483)wxiaoguang2022-10-181-4/+4
| | | | | | | | | Backport #21479 For normal commits the notification url was wrong because oldCommitID is received from the shrinked commits list. This PR moves the commits list shrinking after the oldCommitID assignment.
* Display total commit count in hook message (#21400) (#21481)KN4CK3R2022-10-1713-68/+74
| | | | | | Backport of #21400 Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Enforce grouped NuGet search results (#21442) (#21480)KN4CK3R2022-10-172-35/+72
| | | Backport of #21442
* Return 404 when user is not found on avatar (#21476) (#21477)Gusted2022-10-171-0/+4
| | | | | - Backport #21476 - Instead of returning a 500 Internal Server when the user wasn't found, return 404 Not found.
* Changelog v1.17.3 (#21456)v1.17.365432022-10-151-0/+36
|
* improve code quality (#21464) (#21463)65432022-10-156-27/+64
| | | | | Backport #21464 and #21465 Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Do DB update after merge in hammer context (#21401) (#21416)zeripath2022-10-121-10/+12
| | | | | | | | | | | | | | Backport #21401 When merge was changed to run in the background context, the db updates were still running in request context. This means that the merge could be successful but the db not be updated. This PR changes both these to run in the hammer context, this is not complete rollback protection but it's much better. Fix #21332 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Add Num{Issues,Pulls} stats checks (#21404) (#21414)Gusted2022-10-121-1/+13
| | | | | | | | | | | Backport #21404 Currently `repository.Num{Issues,Pulls}` weren't checked and could become out-of-consistency. Adds these two checks to `CheckRepoStats`. Fix incorrect SQL query for `repository.NumClosedPulls`, the check should be for `repo_num_pulls`. Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Bump `golang.org/x/text` (#21412) (#21413)Gusted2022-10-112-12/+10
| | | | | | - Backport #21412 - Update the `golang.org/x/text` dependency, this fixes [a security issue](https://groups.google.com/g/golang-announce/c/-hjNw559_tE/m/KlGTfid5CAAJ).
* Stop logging CheckPath returns error: context canceled (#21064) (#21405)zeripath2022-10-112-4/+2
| | | | | | | | | | | | | Backport #21064 We should only log CheckPath errors if they are not simply due to context cancellation - and we should add a little more context to the error message. Fix #20709 Signed-off-by: Andrew Thornton <art27@cantab.net> Signed-off-by: Andrew Thornton <art27@cantab.net>
* Set SemverCompatible to false for Conan packages (#21275) (#21366)KN4CK3R2022-10-102-3/+2
| | | Backport of #21275
* Make NuGet service index publicly accessible (#21242) (#21277)KN4CK3R2022-10-082-53/+75
| | | | | | Backport of #21242 Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: 6543 <6543@obermui.de>
* Parse OAuth Authorization header when request omits client secret (#21351) ↵M Hickford2022-10-081-2/+21
| | | | | | | | | | | | | | | | | | | | | | (#21374) Backport #21351 This fixes error "unauthorized_client: invalid client secret" when client includes secret in Authorization header rather than request body. OAuth spec permits both: https://www.rfc-editor.org/rfc/rfc6749#section-2.3.1 Clients in possession of a client password MAY use the HTTP Basic authentication scheme ... Alternatively, the authorization server MAY support including the client credentials in the request-body Sanity validation that client id and client secret in request are consistent with Authorization header. Improve error descriptions. Error codes remain the same. Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: zeripath <art27@cantab.net>
* Ignore port for OAuth2 loopback redirect URIs (#21293) (#21373)M Hickford2022-10-082-0/+33
| | | | | | | Backport #21293 Following https://datatracker.ietf.org/doc/html/rfc8252#section-7.3 Fixes #21285
* Tag list should include draft releases with existing tags (#21263) (#21365)Jason Song2022-10-074-8/+24
| | | | | | | Backport #21263. Before, a tag for a draft release disappeared in the tag list, fix #21262. Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix linked account translation (#21331) (#21334)John Olheiser2022-10-051-1/+1
|
* Fix missing m.Run() in TestMain (#21341)wxiaoguang2022-10-052-1/+5
| | | Backport #21340, add the missing m.Run()
* Foreign ID conflicts if ID is 0 for each item (#21271) (#21272)techknowlogick2022-10-021-0/+4
| | | | | The default is 0 if not defined, and that causes dupe index errors Backport of #21271
* Update bluemonday (#21281) (#21287)65432022-09-282-9/+9
| | | | | | | Backport #21281 https://github.com/microcosm-cc/bluemonday/releases/tag/v1.0.20 Co-authored-by: Lauris BH <lauris@nix.lv>
* Fix empty container layer history and UI (#21251) (#21278)KN4CK3R2022-09-274-3/+15
| | | Backport of #21251
* Use absolute links in feeds (#21229) (#21265)KN4CK3R2022-09-263-34/+43
| | | | | | Backport of #21229 Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Use en-US as fallback when using other default language (#21200) (#21256)wxiaoguang2022-09-253-8/+34
| | | | | | Only en-US has complete translations. When use other language as default, the en-US should still be used as fallback. Backport #21200, Close #21199
* Make Clone in VSCode link get updated correctly (#21225) (#21226)wxiaoguang2022-09-232-14/+18
| | | | | | | | | Backport #21225, fix for #21128 (also in 1.17.3), close #21224 The indent was incorrect before, so this PR did some formatting work. Bypass Golang's template bug for JS string interpolation. And since there are JS lint rules for templates, so the string interpolation is also a must.
* Respect `REQUIRE_SIGNIN_VIEW` for packages (#20873) (#21232)KN4CK3R2022-09-232-33/+62
| | | | | | | | | Backport of #20873 When REQUIRE_SIGNIN_VIEW = true, even with public repositories, you can only see them after you login. The packages should not be accessed without login. Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Prevent invalid behavior for file reviewing when loading more files (#21230) ↵delvh2022-09-222-13/+22
| | | | | | | | | | | | | | | | | | (#21234) Backport of #21230 The problem was that many PR review components loaded by `Show more` received the same ID as previous batches, which confuses browsers (when clicked). All such occurrences should now be fixed. Additionally improved the background of the `viewed` checkbox. Fixes #21228. Fixes #20681. Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Use Go 1.19 fmt for Gitea 1.17, sync emoji data (#21239)wxiaoguang2022-09-2225-581/+629
| | | | | | | The images used by Gitea's drone pipeline were upgraded to Go 1.19.x It causes the lint fails because Go 1.19 uses new code format. This PR partially backport #20758 (including the emoji-data sync), partially fix the format manually.
* Treat git object mode 40755 as directory (#21195) (#21218)wxiaoguang2022-09-201-2/+2
| | | | | | | | Backport #21195 Git uses 040000 for tree object, but some users may get 040755 for unknown reasons, fix #21190 Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Make the vscode clone link respect transport protocol (#20557) (#21128)Abdul Monim2022-09-202-1/+6
| | | | | | Backports #20557 Co-authored-by: Norwin <noerw@users.noreply.github.com> Co-authored-by: Munim Munna <6266677+monim67@users.noreply.github.com>
* Allow uppercase ASCII alphabet in PyPI package names (#21095) (#21217)KN4CK3R2022-09-201-1/+1
| | | | | Backport of #21095 Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Fix limited user cannot view himself's profile (#21212)Lunny Xiao2022-09-201-2/+2
| | | | | | | | backport #21210, fix #21206 If user and viewer are equal the method should return true. Also the common organization check was wrong as count can never be less then 0. Tests are on main branch.
* Fix template bug of admin monitor (#21209)Lunny Xiao2022-09-201-1/+1
| | | backport #21208
* Fix reaction of issues (#21185) (#21196)Jason Song2022-09-181-4/+15
| | | | | | | | | | | | | | Backport #21185. Fix #20860. `CommentID` in `FindReactionsOptions` should be -1 to search reactions with zero comment id. https://github.com/go-gitea/gitea/blob/8351172b6e5221290dc5b2c81e159e2eec0b43c8/models/issues/reaction.go#L108-L121 Co-authored-by: Lauris BH <lauris@nix.lv>
* Fix CSV diff for added/deleted files (#21189) (#21193)wxiaoguang2022-09-173-20/+20
| | | | | | | Backport #21189 Fixes #21184 Regression of #19552 Instead of using `GetBlobByPath`, use the already existing instances.
* Fix pagination limit parameter problem (#21111)Tyrone Yeh2022-09-081-1/+1
| | | | | backport #21109 Co-authored-by: 6543 <6543@obermui.de>
* Add MD5 back to template helper functions to avoid breaking (#21102)wxiaoguang2022-09-071-0/+1
| | | | | | In #20932 the MD5 helper function was removed from template context, it breaks user's customized templates. This PR adds the MD5 helper function back.
* Add changelog for v1.17.2 (#21089)v1.17.2Lunny Xiao2022-09-061-0/+44
| | | | | | Co-authored-by: John Olheiser <john+github@jolheiser.com> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Fix sub folder in repository missing add file dropdown (#21069) (#21083)Tyrone Yeh2022-09-061-26/+27
| | | | | Backport #21069 In repository sub folder missing add file dropdown menu, Probably broken since #20602
* Fix hard-coded timeout and error panic in API archive download endpoint ↵zeripath2022-09-067-71/+127
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#20925) (#21051) Backport #20925 This commit updates the `GET /api/v1/repos/{owner}/{repo}/archive/{archive}` endpoint which prior to this PR had a couple of issues. 1. The endpoint had a hard-coded 20s timeout for the archiver to complete after which a 500 (Internal Server Error) was returned to client. For a scripted API client there was no clear way of telling that the operation timed out and that it should retry. 2. Whenever the timeout _did occur_, the code used to panic. This was caused by the API endpoint "delegating" to the same call path as the web, which uses a slightly different way of reporting errors (HTML rather than JSON for example). More specifically, `api/v1/repo/file.go#GetArchive` just called through to `web/repo/repo.go#Download`, which expects the `Context` to have a `Render` field set, but which is `nil` for API calls. Hence, a `nil` pointer error. The code addresses (1) by dropping the hard-coded timeout. Instead, any timeout/cancelation on the incoming `Context` is used. The code addresses (2) by updating the API endpoint to use a separate call path for the API-triggered archive download. This avoids producing HTML-errors on errors (it now produces JSON errors). Signed-off-by: Peter Gardfjäll <peter.gardfjall.work@gmail.com> Signed-off-by: Peter Gardfjäll <peter.gardfjall.work@gmail.com> Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Peter Gardfjäll <peter.gardfjall.work@gmail.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Fix delete user missed some comments (#21067) (#21068)Lunny Xiao2022-09-062-4/+4
|
* Delete unreferenced packages when deleting a package version (#20977) (#21060)zeripath2022-09-042-2/+78
| | | | | | | | | Backport #20977 Delete a package if its last version got deleted. Otherwise removing the owner works only after the clean up job ran. Fix #20969 Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
* Redirect if user does not exist on admin pages (#20981) (#21059)zeripath2022-09-041-1/+5
| | | | | | | | Backport #20981 When on /admin/users/ endpoints if the user is no longer in the DB, redirect instead of causing a http 500. Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
* Set uploadpack.allowFilter etc on gitea serv to enable partial clones with ↵zeripath2022-09-041-1/+14
| | | | | | | | | | | | | | | ssh (#20902) (#21058) Backport #20902 When setting.Git.DisablePartialClone is set to false then the web server will add filter support to web http. It does this by using`-c` command arguments but this will not work on gitea serv as the upload-pack and receive-pack commands do not support this. Instead we move these options into the .gitconfig instead. Fix #20400 Signed-off-by: Andrew Thornton <art27@cantab.net> Signed-off-by: Andrew Thornton <art27@cantab.net>
* Fix 500 on time in timeline API (#21052) (#21057)qwerty2872022-09-041-0/+6
| | | | | | | | Backport #21052 Before converting a TrackedTime for the API we need to load its attributes - otherwise we get an NPE. Fix #21041