summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Add basic edit ldap auth test & actually fix #16252 (#16465) (#16494)v1.15.0-rc2zeripath2021-07-223-13/+87
| | | | | | | | | | | | | | | | | | | | | | Backport #16465 One of the reasons why #16447 was needed and why #16268 was needed in the first place was because it appears that editing ldap configuration doesn't get tested. This PR therefore adds a basic test that will run the edit pipeline. In doing so it's now clear that #16447 and #16268 aren't actually solving #16252. It turns out that what actually happens is that is that the bytes are actually double encoded. This PR now changes the json unmarshal wrapper to handle this double encode. Fix #16252 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de>
* Restore creation of git-daemon-export-ok files (#16508) (#16514)zeripath2021-07-222-2/+86
| | | | | | | | | | | | | | | Backport #16508 Somewhere along the line the creation of git-daemon-export-ok files disappeared but the updating of these files when repo visibility changes remained. The problem is that the current state will create files even when the org or user is private. This PR restores creation correctly. Fix #15521 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Changelog for 1.15.0-rc2 (#16511)zeripath2021-07-221-0/+13
| | | | | | | | | | | | | | | | * Changelog for 1.15.0-rc2 Results of `~/go/bin/changelog -m 1.15.0 --after 16422 generate` We need to release RC2 as there are mulitple problems with alpine 3.14 related to the seccomp issues on Docker <20. Signed-off-by: Andrew Thornton <art27@cantab.net> * Update CHANGELOG.md Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de>
* Fix data race in bleve indexer (#16474) (#16509)65432021-07-223-6/+69
| | | | | * Fix data race in bleve indexer Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Restore CORS on git smart http protocol (#16496) (#16506)zeripath2021-07-212-11/+31
| | | | | | | | | | | | | | | | | | | Backport #16496 Unfortunately the chi changes have resulted in the CORS headers for the git smart http protocol going missing. This is mostly because the OPTIONS method is not being handled by httpBase anymore. This PR adds a GetOptions, PostOptions and Options methods to web handler to allow OPTIONS method requests to still reach the httpBase function. Fix #16350 Close #16491 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Fix race in log (#16490) (#16505)zeripath2021-07-212-27/+30
| | | | | | | | | Backport #16490 A race has been detected in #1441 relating to getting log levels. This PR protects the GetLevel and GetStacktraceLevel calls with a RW mutex. Signed-off-by: Andrew Thornton <art27@cantab.net>
* Add TestPrepareWikiFileName (#16487) (#16498)65432021-07-217-4/+76
| | | | | | | | | * Add TestPrepareWikiFileName * use LsTree as LsFiles is index only * ajust other tests Co-authored-by: Andrew Thornton <art27@cantab.net>
* Make cancel from CatFileBatch and CatFileBatchCheck wait for the command to ↵zeripath2021-07-202-2/+34
| | | | | | | | | | | end (#16479) (#16480) * Make cancel from CatFileBatch and CatFileBatchCheck wait for the command to end (#16479) Fix #16427 (again!) * handle sharing violation error code Signed-off-by: Andrew Thornton <art27@cantab.net>
* fix: support delete non-urlencoded wiki page (#16482) (#16486)Gary Wang2021-07-191-8/+3
| | | | | * fix: support delete non-urlencoded wiki page * fix: check error
* Update notification table with only latest data (#16445) (#16469)zeripath2021-07-173-5/+15
| | | | | | | | When marking notifications read the results may be returned out of order or be delayed. This PR sends a sequence number to gitea so that the browser can ensure that only the results of the latest notification change are shown. Signed-off-by: Andrew Thornton <art27@cantab.net>
* Retry rename on lock induced failures (re-fix) (#16461) (#16462)zeripath2021-07-161-1/+1
| | | | | | | | | | Backport #16461 Unfortunately #16435 asserts the wrong error and should use os.LinkError not os.PathError. Fix #16439 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Frontport v1.14.5 (#16453)zeripath2021-07-161-0/+12
| | | | | | | Frontport the changelog from v1.14.5 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Lauris BH <lauris@nix.lv>
* revert to use alpine 3.13 (#16452)techknowlogick2021-07-163-5/+5
| | | Co-authored-by: zeripath <art27@cantab.net>
* Fix crash following ldap authentication update (#16447) (#16448)zeripath2021-07-151-2/+2
| | | | | | | | | | | Backport #16447 Unfortunately #16268 contained a terrible error, whereby there was a double indirection taken when unmarshalling the source data. This fatally breaks authentication configuration reading. Fix #16342 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Update documentation to reflect #15219 (#16442) (#16444)zeripath2021-07-154-10/+10
| | | | | | | | | | Backport #16442 The move to render custom/public as within /assets in #15219 missed updating several documentation pages. This PR updates this documentation. Signed-off-by: Andrew Thornton <art27@cantab.net>
* Changelog for v1.15.0-rc1 (#16422)v1.15.0-rc165432021-07-152-8/+220
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * changelog -m 1.15.0 generate * enhance changelog * Apply suggestions from code review * Apply suggestions from code review Co-authored-by: techknowlogick <matti@mdranta.net> * move SECURITY before FEATURES * move ENHANCEMENTS above BUGFIXES * as per techknowlogick * more * node16 * Apply suggestions from code review Co-authored-by: Kyle D. <kdumontnu@gmail.com> * next * Apply suggestions from code review * Update CHANGELOG.md Co-authored-by: Norwin <noerw@users.noreply.github.com> * Update CHANGELOG.md Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: Kyle D. <kdumontnu@gmail.com> Co-authored-by: Norwin <noerw@users.noreply.github.com> Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Retry rename on lock induced failures (#16435)zeripath2021-07-158-14/+42
| | | | | | | | | | | | | | | | | | * Retry rename on lock induced failures Due to external locking on Windows it is possible for an os.Rename to fail if the files or directories are being used elsewhere. This PR simply suggests retrying the rename again similar to how we handle the os.Remove problems. Fix #16427 Signed-off-by: Andrew Thornton <art27@cantab.net> * resolve CI fail Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* [skip ci] Updated translations via CrowdinGiteaBot2021-07-151-0/+1
|
* [skip ci] Updated translations via CrowdinGiteaBot2021-07-151-0/+3
|
* [skip ci] Updated translations via CrowdinGiteaBot2021-07-151-0/+8
|
* add note about minimum required version of git installed (#16433)techknowlogick2021-07-141-0/+2
|
* [skip ci] Updated translations via CrowdinGiteaBot2021-07-141-22/+22
|
* Change the release cycle to match actual situations (#16430)Lunny Xiao2021-07-141-6/+8
| | | | | | | | * Change the release cycle to match actual situations * Update CONTRIBUTING.md Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Lauris BH <lauris@nix.lv>
* Change docker tag logic (#16421)techknowlogick2021-07-145-24/+197
| | | | | | | | | | | | | * Change docker logic * Apply suggestions from code review Co-authored-by: Kyle D. <kdumontnu@gmail.com> * docs Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: Kyle D. <kdumontnu@gmail.com>
* [skip ci] Updated translations via CrowdinGiteaBot2021-07-141-0/+15
|
* Second attempt at preventing zombies (#16326)zeripath2021-07-1421-143/+229
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Second attempt at preventing zombies * Ensure that the pipes are closed in ssh.go * Ensure that a cancellable context is passed up in cmd/* http requests * Make cmd.fail return properly so defers are obeyed * Ensure that something is sent to stdout in case of blocks here Signed-off-by: Andrew Thornton <art27@cantab.net> * placate lint Signed-off-by: Andrew Thornton <art27@cantab.net> * placate lint 2 Signed-off-by: Andrew Thornton <art27@cantab.net> * placate lint 3 Signed-off-by: Andrew Thornton <art27@cantab.net> * fixup Signed-off-by: Andrew Thornton <art27@cantab.net> * Apply suggestions from code review Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Lauris BH <lauris@nix.lv>
* [skip ci] Updated translations via CrowdinGiteaBot2021-07-148-11/+4
|
* [skip ci] Updated translations via CrowdinGiteaBot2021-07-1423-36/+720
|
* Use TrN helper for email templates (#16425)65432021-07-145-6/+9
| | | | | | | * Add TrN helper * use TrN * a nit
* Make gpg resource string more readable (#16423)delvh2021-07-141-1/+1
|
* [skip ci] Updated translations via CrowdinGiteaBot2021-07-145-1/+79
|
* Fix activation of primary email addresses (#16385)Meano2021-07-135-49/+56
| | | | | | | | | | | | | | | | * fix: primary email cannot be activated * Primary email should be activated together with user account when 'RegisterEmailConfirm' is enabled. * To fix the existing error state. When 'RegisterEmailConfirm' is enabled, the admin should have permission to modify the activations status of user email. And the user should be allowed to send activation to primary email. * Only judge whether email is primary from email_address table. * Improve logging and refactor isEmailActive Co-authored-by: zeripath <art27@cantab.net>
* Return updated repository when changing repository using API (#16420)65432021-07-131-1/+7
|
* Load issue/PR context popup data only when needed (#15955)Lauris BH2021-07-133-55/+152
| | | | | | | * Load issue/PR context popup data only when needed * Add SVG icon Vue component * Remove unneeded check
* Support HTTP/2 in Let's Encrypt (#16371)Stanley Hu2021-07-132-1/+2
| | | | | Modify the tlsConfig.NextProtos for Let's Encrypt and built-in HTTPS server in order to support HTTP/2. Co-authored-by: 6543 <6543@obermui.de>
* fix calculation for finalPage in repo-search component (#16382)65432021-07-131-1/+1
| | | Co-authored-by: Jan Naahs <jan.naahs@naahstea.de>
* Add option to provide signature for a token to verify key ownership (#14054)zeripath2021-07-1320-726/+1275
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add option to provide signed token to verify key ownership Currently we will only allow a key to be matched to a user if it matches an activated email address. This PR provides a different mechanism - if the user provides a signature for automatically generated token (based on the timestamp, user creation time, user ID, username and primary email. * Ensure verified keys can act for all active emails for the user * Add code to mark keys as verified * Slight UI adjustments * Slight UI adjustments 2 * Simplify signature verification slightly * fix postgres test * add api routes * handle swapped primary-keys * Verify the no-reply address for verified keys * Only add email addresses that are activated to keys * Fix committer shortcut properly * Restructure gpg_keys.go * Use common Verification Token code Signed-off-by: Andrew Thornton <art27@cantab.net>
* Fix archive error when rename repo or user (#16399)Lunny Xiao2021-07-135-23/+35
| | | Use repo id instead of full name to generate archive path
* Let branch/tag name be a valid ref to get CI status (#16400)65432021-07-134-60/+92
| | | | | | | | | * fix #16384# * refactor: move shared helper func to utils package * extend Tests * use ctx.Repo.GitRepo if not nil
* Detect encoding changes while parsing diff (#16330)Jimmy Praet2021-07-131-19/+31
| | | * Detect encoding changes while parsing diff
* [skip ci] Updated translations via CrowdinGiteaBot2021-07-136-3/+53
|
* Add checkbox to delete pull branch after successful merge (#16049)Jimmy Praet2021-07-1314-43/+181
| | | | | | | | | | | | | | | | | | | | | | | * Add checkbox to delete pull branch after successful merge * Omit DeleteBranchAfterMerge field in json * Log a warning instead of error when PR head branch deleted * Add DefaultDeleteBranchAfterMerge to PullRequestConfig * Add support for delete_branch_after_merge via API * Fix for API: the branch should be deleted from the HEAD repo If head and base repo are the same, reuse the already opened ctx.Repo.GitRepo * Don't delegate to CleanupBranch, only reuse branch deletion code CleanupBranch contains too much logic that has already been performed by the Merge * Reuse gitrepo in MergePullRequest Co-authored-by: Andrew Thornton <art27@cantab.net>
* Fix external renderer (#16401)65432021-07-122-0/+7
| | | | | | | | | * fix external renderer * use GBackground context as fallback * no fallback, return error Co-authored-by: Lauris BH <lauris@nix.lv>
* Validate Issue Index before querying DB (#16406)Norwin2021-07-121-0/+3
|
* docs: rewrite email setup (#16404)Bagas Sanjaya2021-07-121-11/+19
| | | | | | | * Add intro for both the docs page and mailer methods * Fix numbering level in SMTP section * Recommends implicit TLS Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
* Replace `plugins/docker` with `techknowlogick/drone-docker`in ci (#16407)65432021-07-121-5/+5
| | | | | * plugins/docker -> techknowlogick/drone-docker * It is multi-arch
* [skip ci] Updated translations via CrowdinGiteaBot2021-07-125-10/+2
|
* Add LRU mem cache implementation (#16226)zeripath2021-07-105-6/+219
| | | | | | | | | | | | | | The current default memory cache implementation is unbounded in size and number of objects cached. This is hardly ideal. This PR proposes creating a TwoQueue LRU cache as the underlying cache for Gitea. The cache is limited by the number of objects stored in the cache (rather than size) for simplicity. The default number of objects is 50000 - which is perhaps too small as most of our objects cached are going to be much less than 1kB. It may be worth considering using a different LRU implementation that actively limits sizes or avoids GC - however, this is just a beginning implementation. Signed-off-by: Andrew Thornton <art27@cantab.net>
* Fix invalid params and typo of email templates (#16394)Meano2021-07-103-6/+6
| | | Signed-off-by: Meano <meanocat@gmail.com>
* [skip ci] Updated translations via CrowdinGiteaBot2021-07-102-4/+7
|